csvstat chokes on "inf" numbers
Created by: rslemos
For the following input CSV (yes, 1 row, 1 column, 1 header):
headerA
inf
csvstat
(no other argument besides input.csv) outputs:
1. "columnA"
Type of data: Number
Contains null values: False
Unique values: 1
Most common values: [<class 'decimal.InvalidOperation'>]
This happens because python-babel
(in Debian system 2.4.0) number formatting function chokes on Infinity, e.g.:
from decimal import Decimal
from babel.numbers import format_decimal
format_decimal(Decimal("Infinity"))
format_decimal
is called from csvstat.py:269
(in Debian system 1.0.2-1).
Interestingly csvstat --freq
outputs:
{ "Infinity": 1 }