You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This patch adds a lot of data = data.tz_localize(None) in utils.py, for example in _prepare_prices.
But if input data is pd.Series, not Dataframe, data.tz_localize is wrong.
>>> data = pd.Series([0.000000, 0.000008])
>>> data
0 0.000000
1 0.000008
dtype: float64
>>> data.tz_localize(None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/mingfei/.local/lib/python3.12/site-packages/pandas/core/generic.py", line 11725, in tz_localize
ax = _tz_localize(ax, tz, ambiguous, nonexistent)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mingfei/.local/lib/python3.12/site-packages/pandas/core/generic.py", line 11708, in _tz_localize
raise TypeError(
TypeError: index is not a valid DatetimeIndex or PeriodIndex
The text was updated successfully, but these errors were encountered:
commit 8ce8784 introduce this bug.
This patch adds a lot of
data = data.tz_localize(None)
inutils.py
, for example in_prepare_prices
.But if input data is pd.Series, not Dataframe,
data.tz_localize
is wrong.The text was updated successfully, but these errors were encountered: