Skip to content

Commit 025de9d

Browse files
committed
BUG: Fix for #9764
Values from range [1e-7, 5e-7] (for display.precision=7) not displaying 0 anymore
1 parent 29f0bfc commit 025de9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1996,7 +1996,7 @@ def _format_strings(self):
19961996

19971997
# this is pretty arbitrary for now
19981998
has_large_values = (abs_vals > 1e8).any()
1999-
has_small_values = ((abs_vals < 10 ** (-self.digits)) &
1999+
has_small_values = ((abs_vals < 10 ** (-self.digits+1)) &
20002000
(abs_vals > 0)).any()
20012001

20022002
if too_long and has_large_values:

0 commit comments

Comments
 (0)