Skip to content

Commit 9d9337e

Browse files
adamkleinwesm
authored andcommitted
PR#576 changes per wesm comments, cleaned
1 parent 5d9b513 commit 9d9337e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

pandas/core/common.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -491,10 +491,7 @@ def set_eng_float_format(precision=3, use_eng_prefix=False):
491491
_float_format = EngFormatter(precision, use_eng_prefix)
492492
_column_space = max(12, precision + 9)
493493

494-
def _float_format(x):
495-
str_repr = '% .4g' % x
496-
return str_repr
497-
494+
_float_format = lambda x: '% .4g' % x
498495
_column_space = 12
499496
_max_rows = 500
500497
_max_columns = 0
@@ -523,7 +520,7 @@ def _just_help(x):
523520
else:
524521
formatted = _float_format(s)
525522

526-
# if we pass max_width, pad-zero the floats so all are same in column
523+
# if we pass col_width, pad-zero the floats so all are same in column
527524
if col_width is not None and formatted != ' 0':
528525
padzeros = col_width - len(formatted)
529526
if padzeros > 0:

0 commit comments

Comments
 (0)