see dataframe 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)
lst = data.columns.values # data is dataframe
print(data.columns.values)