# Basic syntax:
your_dataframe.columns
# Note, if you want the column names as a list, just do:
list(your_dataframe.columns)
lst = data.columns.values # data is dataframe
print(data.columns.values)
# Import pandas package
import pandas as pd
# making data frame
data = pd.read_csv("nba.csv")
# iterating the columns
for col in data.columns:
print(col)
print(df.rename(columns={'A': 'a', 'C': 'c'}))