pandas get columns names code example
Example 1: pd dataframe get column names
lst = data.columns.values # data is dataframe
Example 2: pandas dataframe column names
print(data.columns.values)
Example 3: dataframe names pandas
print(df.rename(columns={'A': 'a', 'C': 'c'}))