Unstacking after a groupby aggregation

Grouping data by a single column and performing an aggregation on a single column returns a simple and straightforward result that is easy to consume. When grouping by more than one column, a resulting aggregation might not be structured in a manner that makes consumption easy. Since groupby operations by default put the unique grouping columns in the index, the unstack method can be extremely useful to rearrange the data so that it is presented in a manner that is more useful for interpretation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.134.154