[python] How to iterate over columns of pandas dataframe to run regression

A workaround is to transpose the DataFrame and iterate over the rows.

for column_name, column in df.transpose().iterrows():
    print column_name