-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError 'currencyCode' in get_financial_data() #271
Comments
I think the problem is that the valuation ratios you're trying to retrieve, 'PeRatio', 'PegRatio', and 'PbRatio', aren't found in financial statements. Take a look at the documentation for the |
My apologies, you are correct! And trying your code, I get the same error as you do. I had never tried to retrieve these valuation measures from the financial statements because logically, they don't seem to belong there. They are market-based metrics that continually change as the stock price moves, and they aren't reported by companies in their quarterly filings. Maybe at one point Yahoo Finance had these stats in the "Financials" tab of their stock pages, but they are now found on the "Statistics" tab. You can now get the data you need from the |
Describe the bug
get_financial_data()
is crashingTo Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect the function to return a pandas Dataframe with those values
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: