Skip to content

Instantly share code, notes, and snippets.

@grahamharrison68
Created October 17, 2020 17:14
Show Gist options
  • Save grahamharrison68/35113da754ca26a62e2a45b754a46024 to your computer and use it in GitHub Desktop.
Save grahamharrison68/35113da754ca26a62e2a45b754a46024 to your computer and use it in GitHub Desktop.
# %% Remove the outliers
print(f"rows before removing: {df.shape[0]}")
df = remove_outliers(df, 'Col0')
df = remove_outliers(df, 'Col1')
df = remove_outliers(df, 'Col2')
print(f"rows after removing: {df.shape[0]}")
# Let's have a look at the end-result. Here is something very strange though, our data still appears to have outliers!
box_and_whisker(df, 'Col0')
box_and_whisker(df, 'Col1')
box_and_whisker(df, 'Col2')
_, _, _, _, minimum_Col1_after, maximum_Col1_after = get_iqr_values(df, 'Col1')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment