Skip to content

Commit 093f4f4

Browse files
author
Joon Ro
committed
changed _pfixed in common.py to add a leading space to positive numbers
1 parent 45d5eef commit 093f4f4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/core/common.py

+3
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ def _pfixed(s, space, nanRep=None, float_format=None):
8383
else:
8484
formatted = '%.4g' % s
8585

86+
if formatted[0] != '-':
87+
formatted = ' ' + formatted
88+
8689
return formatted.ljust(space)
8790
else:
8891
return ('%s' % s)[:space].ljust(space)

0 commit comments

Comments
 (0)