We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28a2e6e commit cf5e816Copy full SHA for cf5e816
Orange/widgets/data/owfeaturestatistics.py
@@ -493,8 +493,22 @@ def decoration():
493
494
def display():
495
# pylint: disable=too-many-branches
496
+ def format_zeros(str_val):
497
+ """Zeros should be handled separately as they cannot be negative."""
498
+ if float(str_val) == 0:
499
+ num_decimals = min(self.variables[row].number_of_decimals, 2)
500
+ str_val = f"{0:.{num_decimals}f}"
501
+ return str_val
502
+
503
def render_value(value):
- return "" if np.isnan(value) else attribute.str_val(value)
504
+ if np.isnan(value):
505
+ return ""
506
507
+ str_val = attribute.str_val(value)
508
+ if attribute.is_continuous:
509
+ str_val = format_zeros(str_val)
510
511
512
513
if column == self.Columns.NAME:
514
return attribute.name
0 commit comments