I have a dictionary where the keys are dates formatted '%m/%d/%y' and I want to parse this apart so I can graph the values by month. So the objective is just to transform the keys from m/d/y to just m and keep the same values in the dictionary.
months = dict.keys()
for i in months:
i = dt.datetime.strptime(i[months],'%m/%d/%y').month
I get this error:
TypeError: string indices must be integers
Thanks for any suggestions.