I'm struggling to change the format of the dates of my dataframe. I get the following error:
ValueError: to assemble mappings requires at least that [year, month, day] be specified: [day,month,year] is missing
That's my code,
price_spx = spx.history(start="2010-01-01", end="2019-07-16")
components = pd.read_html('https://en.wikipedia.org/wiki/List_of_S%26P_500_companies')
spx_tickers = components[0]
spx_changes = components[1]
pd.to_datetime(spx_changes['Date'],format='%B %d, %Y')
Thanks for your help :) !