import pandas as pd
df = pd.DataFrame({
'a': [1, 2 ,3], 'b': [4, 5, 6]})
# Method 1:
df.index = [11, 22, 33 ]
# Method 2
df.reset_index(drop=True, inplace=True) # drop=True Express original index Not saved in columns df in
# Method 3
df.set_index(keys=['a'], inplace=True) # take ‘a’ List as index