I want to add a new column to my dataframe and map it to a dictionary. Mapping should be on the index of my original dataframe and I don't know how to use .map() to get there.
d={'KO': 'Consumer, Non-cyclical', 'AAPL': 'Technology'}
df:
Date 2015-12-01
KO 2144.499950
AAPL 5162.959824
I would like the result too look like this:
df:
Date 2015-12-01 industry
KO 2144.499950 Consumer, Non-cyclical
AAPL 5162.959824 Technology