Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How many columns have null values present in them? in pandas

import pandas as pd
df = pd.DataFrame({'a':[1,2,np.nan], 'b':[np.nan,1,np.nan],'c':[np.nan,2,np.nan], 'd':[np.nan,np.nan,np.nan]})
print(pd.isnull(df).sum())
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #columns #null #values #present #pandas
ADD COMMENT
Topic
Name
5+8 =