-
Notifications
You must be signed in to change notification settings - Fork 57
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
Not displaying large numbers (>16 digits) correctly #152
Comments
Oh interesting! Thanks for taking the time to report this. I will have a look and see how to fix this soon. |
Cool, the issue of the 0's always appears for large numbers but I've not yet looked much into why the rounding sometimes doesn't work properly. For those facing this issue, you could either convert the column into string or have an additional column displaying the last few digits (e.g. using modulus). EDIT: I had a brief look at the code and saw that the rendering involves JS, so it could possible to do with the way JS stores large numbers? See https://www.irt.org/script/1031.htm. That would explain why the rounding is incorrect sometimes. |
This is what I found:
import json
json.dumps([1234567890123456789, 2345678901234567890, 3456789012345678901])
I think we have two options: either convert to strings the numbers that are larger than |
I've done some research/experiments on I have not tested how well the |
The answer is no, the current release doesn't support BigInt. It throws an error in the number handling code. However, I've just committed a couple of changes which addresses that issue, and it will now correctly render with a BigInt column. |
Just to say - the other option is to make your long numbers strings in the JSON feed. |
Oh that's interesting! In the long term I think this is the way to go
Yes I think that is the best short term approach. On the Python side I will convert the numbers that are larger than |
I see that I still have some work to do on the Python side as well but I will give it a try. |
Well for the moment it seems more reasonable to convert the columns that contains big integers to string. @titus-ong would you like to give a try to the proposed fix? You can install it with
|
Awesome! Thanks for confirming. By the way, I am wondering whether the default value for |
Ah I didn't think about sorting, but since it affects sorting I think the warning could be |
Thanks for your feedback! I will let the warning by default then. This workaround will be available in |
The issue: Large numbers only display first 16 digits, 17th digit is rounded (sometimes incorrectly) and the rest are 0s.
How to replicate:
Result:
Note that Allen's 17th digit (the second 7 in 77) should be a 9.
Version: 1.4.4
Notebook: Jupyter Notebook
The text was updated successfully, but these errors were encountered: