datapane / datapane

Build and share data reports in 100% Python

Home Page:https://datapane.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DataTable inducing erratic rounding off for decimal values

VivekDehariya opened this issue · 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

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. 👍

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

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.

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

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

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!