Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
df=df.groupby('name').filter(lambda x:len(x)>500).reset_index(drop=True)
print('Number of products=>',len(df['name'].unique()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment