datapane icon indicating copy to clipboard operation
datapane copied to clipboard

DataTable inducing erratic rounding off for decimal values

Open VivekDehariya opened this issue 2 years ago • 5 comments

System Information

  • OS: Windows 10
  • Python version: 3.10.5
  • Python environment: pip
  • Using jupyter: false
  • Datapane version: 0.14.0

Bug / Issue

Using a DataTable object inside a report rounds off the values completely wrongly. This is not the case when using a Table object or adding an Attachment with the same dataframe object, the values are correct while using any of these.

For instance: 691355.0 becomes 691400, 769358.78 becomes 769400. This is completely unusable.

#159

VivekDehariya avatar Jun 12 '22 18:06 VivekDehariya

Hello @VivekDehariya!

Thank you for raising this! I've been able to reproduce the issue with the following example:

import pandas as pd
import datapane as dp

data = [691355.0, 769358.78]
df = pd.DataFrame(data)

report = dp.Report(
    dp.DataTable(df)
).save(path='report.html', open=True)

We're looking into this now and will have a fix out soon!

In the meantime, I can confirm that this is a rendering issue and the underlying data remains accurate. 👍

shahinrostami avatar Jun 13 '22 16:06 shahinrostami

Hello again @VivekDehariya - we've gotten to the bottom of it and pushed a fix. It should be available soon!

shahinrostami avatar Jun 13 '22 18:06 shahinrostami

Thanks a lot for the quick addressal, @shahinrostami. Please let me know if there's any version upgrade command that would be required to be run for the fix to be available.

VivekDehariya avatar Jun 13 '22 20:06 VivekDehariya

Hi @VivekDehariya! We've just reviewed the update - we'll let you know and close the issue when it's live!

shahinrostami avatar Jun 14 '22 11:06 shahinrostami

Issue was auto-closed, re-opening until the fix is released

Buroni avatar Jun 14 '22 15:06 Buroni

Hey @VivekDehariya ! Thanks again for raising this. I'm happy to say the fix has made it into the recent release, and I've confirmed that it works as intended:

Screenshot 2022-09-06 at 11 26 01

Please let us know if there's anything else!

shahinrostami avatar Sep 06 '22 10:09 shahinrostami