Skip to content

Instantly share code, notes, and snippets.

@admond1994
Last active June 16, 2019 11:51
Show Gist options
  • Select an option

  • Save admond1994/173b4a27a9f2d975cea9c83304ad8c87 to your computer and use it in GitHub Desktop.

Select an option

Save admond1994/173b4a27a9f2d975cea9c83304ad8c87 to your computer and use it in GitHub Desktop.
def remove_nan_values(df):
'''
AIM -> remove NaN values of a particular column and output the whole dataframe
INPUT -> df
OUTPUT -> updated df without NaN values for a particular column
------
'''
df = df[df['col_1'].notnull()]
return df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment