I wonder if there is any method I could use to group column data…
I tried “df.groupby(‘website’).agg(‘rating’)”
but I don’t know how to implement the count, nor do I know how to print the dataframe
Here is my data,
idx Website_name rating
1 a 5
2 b 3
3 b 6
expected output:
website count val_rate(the number of rate >= 5)
a 1 1
b 2 1