I'm trying to group by a column in my data frame and show the count of occurrences and the mean.
an example is the tables below, I want to group by id, and display the count of occurrences of that id and the mean of x.
id x
a 4
a 8
b 6
b 10
b 6
c 4
c 12
my output should be like this
id mean count
a 6 2
b 11 3
c 8 2