Retrieving from a multi-index in Pandas

  Рет қаралды 3,368

Python and Pandas with Reuven Lerner

Python and Pandas with Reuven Lerner

Жыл бұрын

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.
The Jupyter notebook for this (and all) videos are at github.com/reuven/KZbin-not.... And don't forget my free, weekly "Better developers" newsletter about Python and software engineering, at BetterDevelopersWeekly.com/.

Пікірлер: 16
@CHeRKeSSS00
@CHeRKeSSS00 18 күн бұрын
OMG! OMG! OMG! What a content! I am speachless! After buying so many online courses I found you for free? OMG! OMG! OMG!
@ReuvenLerner
@ReuvenLerner 18 күн бұрын
I'm so delighted you enjoyed it!
@CHeRKeSSS00
@CHeRKeSSS00 18 күн бұрын
@@ReuvenLerner I was wondering if you teach on any other platforms? Anywhere to look at your courses? Thanks
@ReuvenLerner
@ReuvenLerner 18 күн бұрын
@@CHeRKeSSS00 Yup, check out LernerPython.com -- lots of courses there!
@horoshuhin
@horoshuhin Жыл бұрын
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
@ReuvenLerner
@ReuvenLerner Жыл бұрын
Thanks so much; I really appreciate it!
@pietraderdetective8953
@pietraderdetective8953 Жыл бұрын
Amazing..one of the most underrated Python/Pandas content creators. Awesome stuff Sir!
@ReuvenLerner
@ReuvenLerner Жыл бұрын
I'm so delighted you enjoy it!
@TadeuszKurpiel
@TadeuszKurpiel 10 ай бұрын
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) ]
@ReuvenLerner
@ReuvenLerner 10 ай бұрын
Excellent! I really like using xs, too.
@osoriomatucurane9511
@osoriomatucurane9511 9 ай бұрын
Absolutely awesome
@ReuvenLerner
@ReuvenLerner 9 ай бұрын
Glad to know you enjoyed it!
@alanhernandez7201
@alanhernandez7201 Жыл бұрын
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!
@ReuvenLerner
@ReuvenLerner Жыл бұрын
Thanks so much, and great to see you here! I'm not 100% sure what you're asking here, but you can always group on a column and then use the "count" aggregate function to find out how many times each value appeared. If that's not what you meant, then let me know!
@nguyenuchuy0330
@nguyenuchuy0330 Жыл бұрын
tNice tutorials doesn't seem to work.
@ReuvenLerner
@ReuvenLerner Жыл бұрын
What part didn't work for you? BTW, you can get the Jupyter notebook I used from GitHub, if that'll help.
Turn numbers into categories with the Pandas "cut" method
9:44
Python and Pandas with Reuven Lerner
Рет қаралды 4,5 М.
Understanding (and avoiding) the SettingWithCopyWarning in Pandas
8:11
Python and Pandas with Reuven Lerner
Рет қаралды 3,5 М.
МАМА И STANDOFF 2 😳 !FAKE GUN! #shorts
00:34
INNA SERG
Рет қаралды 4,4 МЛН
Tom & Jerry !! 😂😂
00:59
Tibo InShape
Рет қаралды 64 МЛН
Pandas MultiIndex Tutorial and Best Practices
30:15
Chicago Python Users Group
Рет қаралды 10 М.
How do I use the MultiIndex in pandas?
25:01
Data School
Рет қаралды 172 М.
Boolean indexing in Pandas made simple
8:23
Python and Pandas with Reuven Lerner
Рет қаралды 1,7 М.
Merging DataFrames in Pandas | Python Pandas Tutorials
22:09
Alex The Analyst
Рет қаралды 84 М.
Pandas Query Filter Function Guide [Beginner Friendly]
14:46
Ryan Nolan Data
Рет қаралды 2,9 М.
How do I avoid a SettingWithCopyWarning in pandas?
13:30
Data School
Рет қаралды 44 М.
How to use the Pandas GroupBy function | Pandas tutorial
19:03
Mısra Turp
Рет қаралды 28 М.
The six most important read_csv arguments in Pandas
16:50
Python and Pandas with Reuven Lerner
Рет қаралды 2,7 М.
Read Messy & Poorly Structured Excel Files Using Pandas (Python)
9:26
Что не так с яблоком Apple? #apple #macbook
0:38
Не шарю!
Рет қаралды 483 М.
ПОКУПКА ТЕЛЕФОНА С АВИТО?🤭
1:00
Корнеич
Рет қаралды 3,6 МЛН