Skip to content

Instantly share code, notes, and snippets.

@grahamharrison68
Created October 17, 2020 17:20
Show Gist options
  • Save grahamharrison68/22e471a23e4dc7ecabab4273641c3a73 to your computer and use it in GitHub Desktop.
Save grahamharrison68/22e471a23e4dc7ecabab4273641c3a73 to your computer and use it in GitHub Desktop.
# Note that I wouldn't usually iterate through every column in the data frame removing outliers as the data
# might not numeric or they might be categorical. The iteration of all columns is just done for expediency here ...
for column in df:
df = remove_all_outliers(df, column)
print(f"{column} has {count_outliers(df, column)} outliers")
box_and_whisker(df, column)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment