python pandas print column names code example Example: pd dataframe get column names lst = data.columns.values # data is dataframe