names of columns pandas code example
Example 1: pd dataframe get column names
lst = data.columns.values # data is dataframe
Example 2: print columns pandas
df = pd.DataFrame(exam_data , index=labels)
# print the columns labeled "name" and "score"
print(df[['name', 'score']])