output columns of dataframe python code example
Example 1: how to find columns of a dataframe
list(my_dataframe.columns.values)
Example 2: print columns pandas
df = pd.DataFrame(exam_data , index=labels)
# print the columns labeled "name" and "score"
print(df[['name', 'score']])