I have a dataframe composed of individuals (their ID's in), activities, and corresponding scores. I'm trying to get the sum of the scores when grouping by the student and an activi
Solution 1:
The problem is that the data type for the scores wasn't consistent (and a float at that!).
Some of them were strings. After I converted all of the scores into floats, the missing activities showed up.
As an added benefit, having the datatypes be uniform, made the calculation much faster!
Post a Comment for "Python: Pandas: Groupby & Pivot Tables Are Missing Rows"