LernerPython blog, from Reuven Lerner: Pandas multi-index: Working with 3D data using `.loc` and `.xs`

3 weeks ago 13
Club.noww.in
 Working with 3D data using `.loc` and `.xs`

My students used to ask if Python Pandas supports 3D data structures.

Answer: No. Series are 1D and data frames are 2D.

But… a multi-index effectively gives you more dimensions. You can then navigate the indexes with .loc and .xs.

The post Pandas multi-index: Working with 3D data using `.loc` and `.xs` appeared first on LernerPython.

Read Entire Article