O'Reilly logo

Learning pandas - Second Edition by Michael Heydt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Grouping using multiple columns

Grouping can also be performed on multiple columns by passing a list of column names. The following code groups the data by both the sensor and axis columns:

Since multiple columns were specified, the name of each group is now a tuple representing each distinct combination of values from both sensor and axis.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required