import pandas as pd
df = pd.DataFrame({'date': ['2015-01-01', '2015-01-02', '2015-01-03'],
'value': ['a', 'b', 'c'],
'num': [1, 2, 3]
})
print(df)
print({c: i for i, c in enumerate(df.columns)})