print the column names of a dataframe code example
Example 1: df change column names
df.rename(columns={"A": "a", "B": "b", "C": "c"},
errors="raise", inplace=True)
Example 2: pd dataframe get column names
lst = data.columns.values # data is dataframe
Example 3: dataframe names pandas
print(df.rename(columns={'A': 'a', 'C': 'c'}))