The Python Oracle

Right way to reverse a pandas DataFrame?

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:01 Accepted answer (Score 423)
01:56 Answer 2 (Score 121)
02:10 Answer 3 (Score 60)
06:08 Answer 4 (Score 26)
06:38 Thank you

--

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

Accepted answer links:
[docs]: http://docs.python.org/2/library/functio...

Answer 3 links:
[slice notation]: https://stackabuse.com/python-slice-nota.../
[df.loc[::-1]]: https://pandas.pydata.org/pandas-docs/st...
[.reset_index(drop=True)]: https://pandas.pydata.org/pandas-docs/st...
[image]: https://i.stack.imgur.com/mXwQc.png
[Benchmarking code]: https://gist.github.com/Coldsp33d/8e7902...
[perfplot]: https://github.com/nschloe/perfplot/blob...
[How to iterate over rows in a DataFrame in Pandas]: https://stackoverflow.com/questions/1647...

--

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

--

Tags
#python #pandas #reverse

#avk47