I am trying to convert a dataframe into dictionary which has columns in the following order
df.columns = Index([u'Symbol', u'Name', u'MarketCap', u'IPOyear', u'Sector', u'Industry'], dtype='object')
when I converted by using
df.to_dict(orient = 'list')
I got a dictionary with the keys in following order
dict1.keys() = ['Sector', 'Name', 'Symbol', 'MarketCap', 'IPOyear', 'Industry']
I want the order to be unchanged. anyone please help me with this?