How do I use the MultiIndex in pandas?

preview_player
Показать описание
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):

=== RELATED RESOURCES ===

== LET'S CONNECT! ==

Рекомендации по теме
Комментарии
Автор

It's rare to find exactly what you're looking for when it comes to Pandas but this was it.

infiltrr
Автор

Slice(None) trick was what I looked everywhere to find and found it here. Thank you so much!

rezas
Автор

Hello from Hungary Kevin! After a period away from the technicalities of python working mostly with Google Analytics and CRO techniques I'm glad to be back to your videos playing around Jupyter. I appreciate a lot the work you do on Data School, so here is a bit of my honest appreciation, thank you and keep it up! John Ostrowski :)

joaoostrowski
Автор

Life saver video! i have been panic for 2 days, read many pieces and still confused. this helped me out! thank you!

annieyang
Автор

Thank you for sharing your knowledge and experience beautifully. I am new to Python and Pandas, was struggling to understand how to select a subset of the data in a MultiIndex scenario. You made it a piece of cake by putting it all in one video, and by comparing and contrasting between Series and Data Frame.

khardu
Автор

Brilliant tutorial. This is the 2nd of yours that I have watched and it covered what I need in my new job. Thank you very much.

stephenmaddock
Автор

Extremely informative, thanks for making it so simple - really good job

searchingsoul
Автор

As always great explaination. You are a gifted teacher, so surely well worth the Patreon membership for you.

carolinefawer-wasser
Автор

Great explanation! Even though I used pandas a lot, I never really understood how multi-indexing worked. Thank you so much for this tutorial, this helped me out a lot!

emuratspahic
Автор

slice(None) instead of : was a very important input. I struggled with it for quite a while before watching this video. Thank you.

ssankarnarayan
Автор

This was so cool! I am already thinking of a dozen ways to use multi-indexing in my newbie projects and adding them to my little presentation next week. I owe a lot of my comfort with pandas to you. I hope your holidays went well, Kevin!

adamyork
Автор

24 hours struggling to get the answer, and the answer just single line *unstack()* method. Thank you so much, I'll subscribe immediately!

owenlie
Автор

I couldn't find the Corey Schafer video on MultiIndex so I'm here.
And I'm not disappointed... subscribed!

brockobama
Автор

ive been stuck trying to understand this reading tru the documentation for ages. 10 mins and i get it this vid is great thanks

billy
Автор

You made this complicated taboo topic so simple to understand. Worth half an hour i spent

amitsardanayt
Автор

Thanks a lot. Including slice(None) was very helpful.

markcampanelli
Автор

Clear explanation with examples. This is exactly what I needed to know. You have yourself a new subscriber.

carlomision
Автор

The most helpful video I've ever seen about Python. Thanks a lot!

HD_
Автор

Thank you gazillion, you are the best! I finally understand the functionality of the Groupby method!

mahyarazad
Автор

Your lesson is sooo simple and clear. I found everything I wanted to know. Thank you

shadrinan