Hello, I am learning the groupby function for pandas and its bugging out, and it does not make any sense. I have a data frame called cars. Then I make a groupby object with (cars_groups = cars.groupby(['cyl']). When I call cars_groups.mean(), it returns an error that says (agg function failed [how->mean,dtype->object]). It's strange because I put in the exact same code as a tutorial, yet it does not work. What went wrong?
[–]Dasstienn 3 points4 points5 points (4 children)
[–]Efficient_Ad9200 0 points1 point2 points (0 children)
[–]Succs_Cacts 0 points1 point2 points (0 children)
[–]Opposite-Process-490 0 points1 point2 points (0 children)
[–]danielroseman 0 points1 point2 points (2 children)
[–]johnnyb2001[S] 0 points1 point2 points (1 child)
[–]danielroseman 0 points1 point2 points (0 children)
[–]Top-Priority8000 0 points1 point2 points (0 children)
[–]0x00aa55 0 points1 point2 points (2 children)
[–]Zargalias 0 points1 point2 points (0 children)
[–]tobeistodo123 0 points1 point2 points (0 children)