Open dhairyadalal opened 5 years ago
The error message can be better than this, but you are counting by a column that does not exist. The following code yields the required result:
dfsd >> group_by(X.animal) >> summarize(count=n(X.animal))
animal count 0 cat 2 1 dog 2
So I want to be to simply do a group by and count on a column with categorical values. When running the code below
I run into a
AttributeError: 'str' object has no attribute 'size'
error.In dplyr, this would be the equivalent of:
df %>% group_by(animal) %>% summarise(count = n())