column name change dataframe code example
Example 1: change specific column name pandas
df_new = df.rename(columns={'A': 'a'}) #change a from A
Example 2: df change column names
df.rename(columns={"A": "a", "B": "b", "C": "c"},
errors="raise", inplace=True)