Skip to content

Commit f429b08

Browse files
author
AntonioAndraues
committed
BUG: set_precision format fixed (pandas-dev#13257)
1 parent d320ef7 commit f429b08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/io/formats/style.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def __init__(
151151

152152
def default_display_func(x):
153153
if is_float(x):
154-
return "{:>.{precision}g}".format(x, precision=self.precision)
154+
return "{0:.{precision}f}".format(x, precision=self.precision).rstrip('0').rstrip('.')
155155
else:
156156
return x
157157

0 commit comments

Comments
 (0)