change the name of the first column in pandas code example
Example 1: change specific column name pandas
df_new = df.rename(columns={'A': 'a'}) #change a from A
Example 2: rename row pandas
>>> df.rename({1: 2, 2: 4}, axis='index')
A B
0 1 4
2 2 5
4 3 6