I have a file that goes like this
AAPL, TSCO, ASDA, ....
10, 11, 12, ...
9, 10, 11, ...
...,...,...,...
Now is there a way to import a list all of these as variables of their column header. So it will beAAPL = [ 10, 9, ...,...]
I know how to print out a list of column headers using:
import pandas as pd
df = pd.read_csv('foo.csv', index_col=0)
col_headers = list(df.columns)
So now I can loop over this list, but is there a way, to automatically assign the variable name as the list header?