Python Pandas For Your Grandpa - 4.5 DataFrame Reshaping

preview_player
Показать описание
In this video we'll see how to use the functions pivot(), pivot_table(), melt(), stack(), and unstack() to restructure the shape of a DataFrame.

0:00 - intro / setup
0:31 - pivot() / long to wide format
1:13 - pivot_table() / pivoting with aggregation
3:24 - melt() / wide to long format
4:40 - stack()
6:32 - unstack()

--- Code ------------------------

--- Vids & Playlists ----------------------------------

--- Subscribe To Mailing List ----------------------------------

--- Song ----------------------------------
Summer Fields by DKH

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

Thank you for this course been really helpful. small question. any reason why you use the print function for the multi-index tables? I think it would be better to display the tables directly without the print functions as the layout should be easier to see what columns/rows are moving in what directions. Thanks

younes
Автор

Check out this updated course (and more) @

gormanalysis