Last active
September 21, 2021 14:13
-
-
Save aniruddha27/3f4446ba23e3aa492fb5853d3cf37093 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def filter_func(x): | |
return x['Item_Weight'].std() < 3 | |
df_filter = df.groupby(['Item_Weight']).filter(filter_func) | |
df_filter.shape |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment