1# Basic syntax:
2your_dataframe.columns
3
4# Note, if you want the column names as a list, just do:
5list(your_dataframe.columns)
1In [4]: import pandas as pd
2In [5]: df = pd.DataFrame(columns=['A','B','C','D','E','F','G'])
3In [6]: df
4Out[6]:
5Empty DataFrame
6Columns: [A, B, C, D, E, F, G]
7Index: []