I have the Yelp dataset and I want to count all reviews which have greater than 3 stars. I get the count of reviews by doing this:
reviews.groupby(\'business
I quite like using method chaining with Pandas as I find it easier to read. I haven't tried it but I think this should also work
reviews.query("stars > 3").groupby("business_id").size()