name of columns python 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: rename pandas columns with list of new names
df.columns = list_of_names