Created
July 10, 2020 11:49
-
-
Save ChaitanyaBaweja/db614d154f47ba81c5de5af909f69d0e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# drop all rows with atleast one NaN | |
new_df = df.dropna(axis = 0, how ='any') | |
# drop all rows with all NaN | |
new_df = df.dropna(axis = 0, how ='all') | |
# drop all columns with atleast one NaN | |
new_df = df.dropna(axis = 1, how ='any') | |
# drop all columns with all NaN | |
new_df = df.dropna(axis = 1, how ='all') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment