biolab / biolab/orange3

Big numbers getting truncated

Open
#6,916 0 comments 0 reactions 0 assignees View on GitHub
bug report
Dominant language
Python
Stars
5.7k
Forks
1.1k
Avg merge
12d 2h
Merged PRs (30d)
1

Description

**What's wrong?**

When loading a csv file with big numbers the data on the table view where you select data types is correct, but the output data truncates the numbers. For example, the following number:
-22112248,96

Got converted (output only) to:
-2.211225e+07

Please note this is using european notation, that is "," as decimal separator.

Trying to reproduce the problem in Pandas I noted that when you print such number to your terminal you get "-2.211225e+07", but if you save it to a csv (using df.to_csv) the number ouputs correctly.

To correctly print the number on the terminal you need to include the following:
pd.options.display.float_format = "{:.2f}".format

**How can we reproduce the problem?**

I managed to reproduce it by importing a csv with this number:
-22112248,96

But it should work with similar numbers in size and format

**What's your environment?**
- Operating system: Windows 11
- Orange version: 3.37.0
- How you installed Orange: Windows installer

Contributor guide

Open the contributing guide

Research direction

Start with the CSV import path and the table view where data types are selected, then trace how numeric values are formatted for output. Reproduce the case with -22112248,96 using European decimal notation and compare the displayed value with the CSV output; done means the output preserves the full number rather than scientific notation.

Written by the indexing model from the issue text.

Assessment

Tech stack
pandas, python
Domain
data, data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.