Closed lxlofpku closed 1 year ago
The stock_analysis
library is using the pandas_datareader
library to query the Yahoo! Finance API for the information. The API has recently changed, which is causing the issue since the pandas_datareader
library doesn't yet know how to handle it. Upstream changes like this are expected, which is why I included all the datasets for this chapter in the data/
folder — use the note box right before "The Stock reader class" section in the book for a code snippet to read them in:
pd.read_csv('data/...', index_col='date', parse_dates=True)
The
stock_analysis
library is using thepandas_datareader
library to query the Yahoo! Finance API for the information. The API has recently changed, which is causing the issue since thepandas_datareader
library doesn't yet know how to handle it. Upstream changes like this are expected, which is why I included all the datasets for this chapter in thedata/
folder — use the note box right before "The Stock reader class" section in the book for a code snippet to read them in:pd.read_csv('data/...', index_col='date', parse_dates=True)
Hi Stefanie, I understand it now. Thanks a lot!
Required attestation
Background information
1. Which OS are you using?
TODO: Provide your OS here – make sure to differentiate between Intel and M1 chip Macs.
Mac M2
2. Which Python version are you using?
TODO: Provide your Python version here.
Python 3.8
3. Are you using
conda
orvenv
?TODO: Indicate whether you are using
conda
orvenv
.conda
Commands run and their outputs
Please provide all of the commands you ran as well as the traceback:
Hi Stefanie:
Recently I installed the stock-analysis package following the instruction in chapter 7 (p. 395) of your book. That is, I installed it by running (in book_env environment):
All went through smoothly, indicating that the installation was successful.
However, as I run the finacial-analysis.ipynb notebook, I could not get the data. The problem is described in the attached screen shots. I have read through the trace back but cannot get a clue what is wrong.
Best regards, Li-Xin
Screenshots
Optionally, include any screenshots that will help diagnose the issue.