how to change index values in pandas dataframe code example
Example 1: change dataframe value by index
x y
A NaN NaN
B NaN NaN
C NaN NaN
df.at['C', 'x'] = 10
Example 2: how to change index in dataframe python
index = [1,2]
df.index = index