print columns from dataframe pandas code example
Example 1: pd dataframe get column names
lst = data.columns.values # data is dataframe
Example 2: list of particular column in pandas dataframe
print(df.columns)
lst = data.columns.values # data is dataframe
print(df.columns)