python some rows are showing up as nan code example
Example 1: count rows with nan pandas
np.count_nonzero(df.isnull().values)
np.count_nonzero(df.isnull()) # also works
Example 2: select rows which have nan values python
df[df['column name'].isna()]