I am working with stock data from Google, Apple, and Amazon. All the stock data was downloaded from yahoo finance in CSV format. I have a file named GOOG.csv containing the Google stock data, a file named AAPL.csv containing the Apple stock data, and a file named AMZN.csv containing the Amazon stock data. I am getting an error when I am trying to check the output of the data frame.
google_stock = google_stock.rename(columns={'Adj Close':'google_stock'},inplace=True)
# Change the Adj Close column label to Apple
apple_stock = apple_stock.rename(columns={'Adj Close':'apple_stock'},inplace=True)
# Change the Adj Close column label to Amazon
amazon_stock = amazon_stock.rename(columns={'Adj Close':'amazon_stock'},inplace=True)
google_stock.head()```
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-29-b562791246eb> in <module>()
1 # We display the google_stock DataFrame
----> 2 google_stock.head()
AttributeError: 'NoneType' object has no attribute 'head'
inplace=Truemakes it update without assigning, so either use:Or use normal assignment without
inplace=True: