how to change the column index of a dataframe in python code example Example: how to change index in dataframe python index = [1,2] df.index = index