Skip to content
Advertisement

pandas groupby ignoring column

Below is my groupby function and dataset before the operation. However, the statement as written produces no change. I want this to be a single row containing sums for each category.

JavaScript
JavaScript

Advertisement

Answer

You need to enclose your list by []:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement