Pandas column of lists, create a row for each list element

Опубликовано: 05 Март 2023
на канале: The Python Oracle
15
0

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: The Builders

--

Chapters
00:00 Question
01:21 Accepted answer (Score 78)
04:21 Answer 2 (Score 159)
05:39 Answer 3 (Score 149)
07:05 Answer 4 (Score 12)
07:57 Thank you

--

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

Accepted answer links:
[DataFrame.explode()]: https://pandas.pydata.org/docs/refere...
[here you may find a bit more generic solution]: https://stackoverflow.com/a/40449726/...

Answer 2 links:
[.explode()]: https://pandas.pydata.org/pandas-docs...
[Exploding a list-like column]: https://pandas.pydata.org/pandas-docs...
[related answer by me.]: https://stackoverflow.com/questions/1...

Answer 4 links:
[pd.concat]: http://pandas.pydata.org/pandas-docs/...
[pd.melt]: http://pandas.pydata.org/pandas-docs/...

--

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

--

Tags
#python #pandas #list

#avk47