-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
to_json float precision bug #15716
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
I think this is expected. You have 17 decimal places ( |
I think 1.0 is expected, not 0.1 |
Ha, indeed. Sorry I missed that. Interested in taking a look at what's going on? Probably somewhere around here. That's all implemented in C, so maybe a bit tricky. |
funnycrab
pushed a commit
to funnycrab/pandas
that referenced
this issue
Apr 2, 2017
This is a fix attempt for issue pandas-dev#15716 as well as pandas-dev#15864. Note that whenever the frac is incremented, there is a chance that its value may hit the value of pow10.
funnycrab
added a commit
to funnycrab/pandas
that referenced
this issue
Apr 2, 2017
The following solved the issue for me: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
xref #15864 for more tests
Code Sample, a copy-pastable example if possible
Problem description
...
Expected Output
'{"a_float":{"0":1.0}}'
Output of
pd.show_versions()
pandas: 0.19.2
nose: 1.3.7
pip: 9.0.1
setuptools: 34.3.2
Cython: 0.24.1
numpy: 1.12.0
scipy: 0.18.1
statsmodelsdouble_precision: 0.6.1
xarray: None
IPython: 5.1.0
sphinx: 1.4.6
patsy: 0.4.1
dateutil: 2.6.0
pytz: 2016.10
blosc: None
bottleneck: 1.1.0
tables: 3.2.3.1
numexpr: 2.6.1
matplotlib: 1.5.3
openpyxl: 2.3.2
xlrd: 1.0.0
xlwt: 1.1.2
xlsxwriter: 0.9.3
lxml: 3.6.4
bs4: 4.5.1
html5lib: None
httplib2: 0.10.3
apiclient: 1.5.3
sqlalchemy: 1.1.2
pymysql: None
psycopg2: None
jinja2: 2.7.3
boto: 2.42.0
pandas_datareader: None
The text was updated successfully, but these errors were encountered: