Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

count nan values

# Count NaN values under a single DataFrame column:
df['column name'].isna().sum()

# Count NaN values under an entire DataFrame:
df.isna().sum().sum()

# Count NaN values across a single DataFrame row:
df.loc[[index value]].isna().sum().sum()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #count #nan #values
ADD COMMENT
Topic
Name
8+3 =