How to Reshape Dataframes | Pivot, Stack, Melt and More

preview_player
Показать описание
When working with datasets you will need to change the shape and the perspective of the data. This is done sometimes for analysis purposes and sometimes just to explore the data a bit better. In this video, we learn 8 ways to change the shape of the dataframe we are working with to gain a new perspective on it. The functions we learn are:

1. pivot
2. pivot_table
3. Stack
4. Unstack
5. Melt
6. Groupby
7. Crosstab
8. Explode

RESOURCES:

COURSES:

00:00 Introduction
00:42 Pivot
02:12 Pivot_table
04:24 Stack
05:45 Unstack
06:22 Melt
07:53 Groupby
09:22 Crosstab
10:36 Explode
12:03 Download the Pandas Cheat Sheet!
Рекомендации по теме
Комментарии
Автор

👉 All you need to know about Pandas in one place!
Download my Pandas Cheat Sheet (free)

misraturp
Автор

Your pandas cheat sheet is WAY more understandable (to me, at least) than the official one in the pandas documentation. Thanks for making it!

uptoolate
Автор

For quite some time twitter hadn't recommended anything really interesting and valuable to watch. Nice video, I'm totally hooked to your content. 💪

jonortiz
Автор

Straightforward explanation of pivot. Like earned!. Thx

simple-stack-by-ed
Автор

Excelente contenido Misra, gracias : )

josep_pacheco
Автор

great video thanks for making my doubts clear of explode function and crosstab

tanishq
Автор

Great job, thanks for this sharing, you're giving energy too ;-)

jugurthasemai
Автор

Good stuff I was trying to figure how to do counts by group. And that is the cross tab.

jerrymarq
Автор

Thank you very much, for your valuable efforts, I don't know how to thank you, anyway thank you always. Please make us groupby tutorial and how to compare it with pivot tables 🙏

mjacfardk
Автор

Thanks for your Video !
Can you please let me know if we can put those collapse and expand functionality in actually generated pivot table in excel using python ??

automatewithamit
Автор

Awesome content...Thanks for sharing it!

Which screen recorder do you use? I really like it. Best!

viniciusoviedo
Автор

Nice tutorial on pivot. I have one query, is there any way we can create the data-link in pivot like we do in excel. Pls help

arpeshmistry
Автор

Hi Misra, amazing video.
I have a doubt. I performed pivot_table() and after getting new columns.. I am not able to select those new columns or save one new column in new df.

E.g. in above video after pivoting you got A, B, C as new columns.. i can not select df['A']? It gives error. When i do df.shape() it shows A, B, C as columns.

Please help.

aakashniture
Автор

Hi I like your videos. BTW, how you get the Juypter to have output horizontal scrollable. My Anaconda Juypter cannot.😊

ericliu
Автор

great tutorial, Eva mendes look like you

sanooosai
Автор

pandas looks a little bit complex than power query. ... So what is pandas's strength?

jianlinchen
Автор

I'm confused at the difference between stack and melt 😅

pomme_paille
Автор

I think it's hard to understand for beginners. especially melt function. maybe you should slow down when you explain examples. thank you so much for tutorial.

hedeyhod
Автор

Thanks for the video. Brilliant person, but why talk so fast? I had to stop it about a twenty times and puzzle out what was being said. After I did, it made sense, but why not slow down to a more comfortable pace? By the way, 'SVCS' means 'Services', isn't it obvious from the context?

johnspivack