Browse Source

preprocess_timeseries converts numbers to float

own-class
Gourav Kumar 2 years ago
parent
commit
2ee8f928af
  1. 2
      fincal/utils.py

2
fincal/utils.py

@ -101,7 +101,7 @@ def _preprocess_timeseries(
raise TypeError("Could not parse the data")
if isinstance(data[0], Sequence):
return sorted([(_parse_date(i, date_format), j) for i, j in data])
return sorted([(_parse_date(i, date_format), float(j)) for i, j in data])
# If first element is not a dictionary or tuple, it cannot be parsed
if not isinstance(data[0], Mapping):

Loading…
Cancel
Save