One of the most powerful features in pandas is multi-level indexing (or "hierarchical indexing"), which allows you to add extra dimensions to your Series or DataFrame objects. But when should you use a MultiIndex, and how do you create, slice, and merge MultiIndexed objects?
In this video, I'll demonstrate:
- How to create a Series with a MultiIndex, and how to convert it to a DataFrame
- How to select from a Series with a MultiIndex
- How to create a DataFrame with a MultiIndex
- How to select from a DataFrame with a MultiIndex
- How to merge two DataFrames with MultiIndexes
WANT TO JOIN MY NEXT WEBCAST? Become a member ($5/month):
www.patreon.com/dataschool
=== RELATED RESOURCES ===
Download the lesson notebook: nbviewer.jupyter.org/github/justmarkham/pandas-videos/blob/master/pandas_multiindex.ipynb
Using the pandas index (Part 1): ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-OYZNk7Z9s6I.html
Using the pandas index (Part 2): ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-15q-is8P_H4.html
Analyzing groups with groupby: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-qy0fDqoMJx8.html
Selection and slicing with loc: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-xvpNA7bC8cs.html
My full pandas video series: ru-vid.com/group/PL5-da3qGB5ICCsgW1MxlZ0Hq8LL5U3u9y
DataCamp course on MultiIndex: www.datacamp.com/courses/manipulating-dataframes-with-pandas?tap_a=5644-dce66f&tap_s=280411-a25fc8
DataCamp course on merging: www.datacamp.com/courses/merging-dataframes-with-pandas?tap_a=5644-dce66f&tap_s=280411-a25fc8
Tidy data: r4ds.had.co.nz/tidy-data.html
== LET'S CONNECT! ==
Newsletter: www.dataschool.io/subscribe/
Twitter: justmarkham
Facebook: DataScienceSchool/
LinkedIn: www.linkedin.com/in/justmarkham/
15 ноя 2018