dataframe change one column name code example
Example 1: rename df column
import pandas as pd
data = pd.read_csv(file)
data.rename(columns={'original':'new_name'}, inplace=True)
Example 2: change specific column name pandas
df_new = df.rename(columns={'A': 'a'}) #change a from A
Example 3: pd dataframe single column rename
df1 = df.rename(columns={'Name': 'EmpName'})
print(df1)