I'm new to Python for starters, when I got this DataFrame from Yahoo Finance, the Date shows up outside the DataFrame. This is leading me to get KeyError: 'Date' when I try to write this line of code
Close_Price['Year'] = Close_Price['Date'].dt.year
Any ideas on how to fix this?