The Python Oracle

How to flatten a hierarchical index in columns

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Magical Minnie Puzzles

--

Chapters
00:00 Question
01:22 Accepted answer (Score 708)
02:12 Answer 2 (Score 195)
03:56 Answer 3 (Score 106)
04:07 Answer 4 (Score 50)
05:25 Thank you

--

Full question
https://stackoverflow.com/questions/1450...

Accepted answer links:
[join]: http://docs.python.org/2/library/stdtype...
[strip]: http://docs.python.org/2/library/stdtype...

Answer 2 links:
[own documentation]: https://pandas.pydata.org/pandas-docs/st...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #pandas #dataframe #multiindex

#avk47