Skip to content

Instantly share code, notes, and snippets.

@ecdedios
Last active May 31, 2020 16:06
Show Gist options
  • Save ecdedios/608f0bf3cf62ad8fd56b634ce77033f4 to your computer and use it in GitHub Desktop.
Save ecdedios/608f0bf3cf62ad8fd56b634ce77033f4 to your computer and use it in GitHub Desktop.
Selecting rows where the column is null or not.
df['Dept'].value_counts(dropna=False)
df_null = df.loc[df['Dept'].isnull()]
df_null.head()
df_null.shape
df_notnull = df.loc[df['Dept'].notnull()]
df_notnull.head()
df_notnull.shape
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment