Skip to content

Commit 83f4091

Browse files
committed
add check for infinity in __call__ of EngFormatter
1 parent f363236 commit 83f4091

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/formats/format.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2586,6 +2586,9 @@ def __call__(self, num):
25862586
if decimal.Decimal.is_nan(dnum):
25872587
return 'NaN'
25882588

2589+
if decimal.Decimal.is_infinite(dnum):
2590+
return 'inf'
2591+
25892592
sign = 1
25902593

25912594
if dnum < 0: # pragma: no cover

0 commit comments

Comments
 (0)