pandas header names code example
Example 1: print columns pandas
df = pd.DataFrame(exam_data , index=labels)
# print the columns labeled "name" and "score"
print(df[['name', 'score']])
Example 2: dataframe names pandas
print(df.rename(columns={'A': 'a', 'C': 'c'}))