Skip to content

Instantly share code, notes, and snippets.

@quantra-go-algo
Created December 22, 2021 03:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quantra-go-algo/273e6b316678810e685bd567e468814a to your computer and use it in GitHub Desktop.
Save quantra-go-algo/273e6b316678810e685bd567e468814a to your computer and use it in GitHub Desktop.
#Dropping columns in the data higher than 60% threshold
data = data[data.columns[data.isnull().mean() < threshold]]
#Dropping rows in the data higher than 60% threshold
data = data.loc[data.isnull().mean(axis=1) < threshold]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment