I am trying to reverse the n last rows and columns in a dataframe in python.
import numpy as np
import pandas as pd
df = pd.DataFrame(index=range(15), columns=range(15))
However, I want to change the dataframe that it looks like this:
#columns:
0 1 2 3 ... 10 15 14 13 12 11
#rows:
0 1 2 3 ... 10 15 14 13 12 11
i.e.: the last 5 elements of rows and columns should be reversed but the primer 10 should have the 'normal' form