Skip to content

Instantly share code, notes, and snippets.

@risenW
Last active December 2, 2019 17:00
Show Gist options
  • Save risenW/873f1a334dd97f6890ceec949090d984 to your computer and use it in GitHub Desktop.
Save risenW/873f1a334dd97f6890ceec949090d984 to your computer and use it in GitHub Desktop.
data = pd.read_csv('some_csv_file.csv)
missing_percent = (data.isna().sum() / data.shape[0]) * 100
cols_2_drop = missing_percent[missing_percent.values >= 80].index
#Drop missing values
df = data.drop(cols_2_drop, axis=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment