Answers for "how to reverse a dataframe in python"

1

reverse pd based on index

data.iloc[::-1]
Posted by: Guest on October-01-2020
0

reverse pd based on index

data.reindex(index=data.index[::-1])
Posted by: Guest on October-01-2020

Code answers related to "how to reverse a dataframe in python"

Python Answers by Framework

Browse Popular Code Answers by Language