-
Notifications
You must be signed in to change notification settings - Fork 679
Yahoo Prices precision - pandas-datareader-0.9.0 #844
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
Comments
This is caused by the way floating point numbers are stored in pandas dataframes. There is a good discusion of the underlying cause in [https://github.com/pandas-dev/pandas/issues/16452] . It explains that it is a presentation issue and not an accuracy issue which means the numbers can safely be rounded. The issue is not caused by the data source but by the conversion into floating point numbers within pandas dataframes. A simple solution is to set how pandas displays floating point numbers, for example if you want to display four decimal point precision use: pd.options.display.float_format = '{:.4f}'.format
df = data.DataReader('GOOGL', start=start,end=end, data_source='yahoo')['Adj Close'] Note:
|
In this case it actually comes from the data source. |
Thanks for the data that shows the issue coming from the source. The use of floating point numbers creates the extra decimals so Yahoo are probably using floating point storage to process the original prices before serving them up. |
Hello
Seems like yahoo is returning prices with more precision than it should. In the webpage they are displayed with tow decimals but in the html we can see extra decimals. The issue is that these extra decimals seem to be random.
Is there some way to fix it? Is it something that can be rounded safely? Is there a better free datasource?
https://finance.yahoo.com/quote/GOOGL/history
The text was updated successfully, but these errors were encountered: