what would be the most efficient way to use groupby and in parallel apply a filter in pandas?
Basically I am asking for the equivalent in SQL of
sele
I group by state and county where max is greater than 20 then subquery the resulting values for True using the dataframe loc
counties=df.groupby(['state','county'])['field1'].max()>20 counties=counties.loc[counties.values==True]