python pandas change index rows 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: pandas print index
# Import pandas package
import pandas as pd
# making data frame
data = pd.read_csv("data.csv")
print(data.index)