Retrieving from a multi-index in Pandas

preview_player
Показать описание
What is a multi-index? How do I create one, and (more importantly), how do I retrieve from one? In this video, I show you a few techniques for working with multi-indexes, including the powerful "xs" method.

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

📊 Enjoyed learning about working with multi-indexes? Take your Python (and Pandas) skills further!

- New Python insights every Monday
- Actionable suggestions to make you a more fluent Python coder
- Deep explanations that go beyond basic syntax

- Dozens of courses covering Python, Git, and Pandas
- Twice-monthly office hours for personalized help
- Exclusive members-only lectures
- Private Discord community for ongoing support

👉 Join other Python developers improving their skills today!

ReuvenLerner
Автор

your level of delivery of the material is one of the greatest I've seen. can't stress this enough. I'd prefer your videos over pandas documentation any day:). especially when describing edge cases, thanks

horoshuhin
Автор

You make this so much easier to understand

stevenherren
Автор

Amazing..one of the most underrated Python/Pandas content creators.

Awesome stuff Sir!

pietraderdetective
Автор

Hi Reuven! what happens if I have unique values, and I I want to know they qtys of each of them, how do I reshape in order to calculate that? by the way your Oreilly course was great!

alanhernandez
Автор

Hi Reuven!
for even more flexibility when selecting from multi-index data frames, you can use the 'get_level_values' method, for example like here:
df[
df.index.get_level_values('Year').isin([1993, 1920, 2010]) &
df.index.get_level_values('Sport').isin(['Archery', 'Judo']) &
(df.Age < 24.0)
]

TadeuszKurpiel
join shbcf.ru