Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I didnt get the NULL values
#1
I want to extract the segment len from a TCP header so I made this code:

def tcp_len_list(s):
    a = [len(p[TCP].payload) if p.haslayer(TCP) else None
            for p in s]
    return a
The problem is that extracts all values except 0

Any idea ?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to express null value klatlap 3 854 Mar-25-2023, 10:40 AM
Last Post: klatlap
Photo How to select NULL and blank values from MySQL table into csv python300 9 2,411 Dec-27-2022, 09:43 PM
Last Post: deanhystad
  Write Null values as 0.0 (float) type in csv mg24 3 1,364 Dec-07-2022, 09:04 PM
Last Post: deanhystad
  value null when update in json file 3lnyn0 6 3,214 Dec-30-2021, 05:52 PM
Last Post: ndc85430
  Multiple conditions, one is null moralear27 1 2,195 Sep-13-2020, 06:11 AM
Last Post: scidam
  Find only the rows containing null values Bhavika 2 2,434 Jun-10-2020, 01:25 PM
Last Post: Bhavika
  g Null Byte using DictReader eshwinsukhdeve 13 7,518 May-15-2019, 08:50 AM
Last Post: buran
  Array/Jarray problem contains null value? Maverick0013 1 3,958 Aug-10-2018, 12:56 PM
Last Post: Windspar
  Replace null values in Json file burnsssss 11 30,425 Jun-11-2018, 09:45 AM
Last Post: burnsssss

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020