Reputation: 1664
I have a data frame that I am getting some counts on, like so:
t = df['NAME'].value_counts()[:10]
I would then like to reduce the original data set (df) to only include items that match t. Something like:
temp = df[t]
or
temp = df[df['NAME'] in t]
Thanks
Upvotes: 0
Views: 114