Python, Pandas : Return only those rows which have missing values
df.isnull().any(axis = 1).sum()
this gives you the total number of rows with at least one missing data
You can use any
axis=1
to check for least one True
per row, then filter with boolean indexing:
null_data = df[df.isnull().any(axis=1)]