This is my csv pivot table, and it has 2 sets of data, hence the duplicate items in the 'pct_type' column. I want to all the values so that I'll be left with just the 6 ranges in the first column, and also the time row. So there will be just 2's in the second column, '9:30', and the rest will also be added.
Asked
Active
Viewed 20 times
0
-
Have you tried something like `df.groupby('pct_type').sum()`? – Vivek Jain Apr 08 '21 at 11:41
-
@VivekJain no that doesn't work – NBC Apr 08 '21 at 11:42
-
Can you explain what result your get with groupby and sum, and how it differs from what you want? Please show your attempts, so others can see the issues and build on your work, or maybe point out any errors. – joanis Apr 08 '21 at 12:39
-
https://stackoverflow.com/help/how-to-ask – joanis Apr 08 '21 at 12:40