Skip to content

Instantly share code, notes, and snippets.

@robsannaa
Last active November 28, 2019 08:48
Show Gist options
  • Save robsannaa/4f3c888cc66d44b7786881d535ae4523 to your computer and use it in GitHub Desktop.
Save robsannaa/4f3c888cc66d44b7786881d535ae4523 to your computer and use it in GitHub Desktop.
Q1 = df.quantile(0.25)
Q3 = df.quantile(0.75)
IQR = Q3 - Q1
df_quantile = df[~((df < (Q1 - 1.5 * IQR)) | (df > (Q3 + 1.5 * IQR))).any(axis=1)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment