Renaming axis levels for easy reshaping

Reshaping with the stack/unstack methods is far easier when each axis (index/column) level has a name. Pandas allows users to reference each axis level by integer location or by name. Since integer location is implicit and not explicit, you should consider using level names whenever possible. This advice follows from The Zen of Python (http://bit.ly/2xE83uC), a short list of guiding principles for Python of which the second one is Explicit is better than implicit.

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

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