change column name in DAtaframe table 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: r change column name in dataframe
df <- df %>%
rename(newName1 = oldName1 ,
newName2 = oldName2)