Update abstract.py: Set default dtype for Series instantiation
Following Pandas advice on this warning message: FutureWarning: The default dtype for empty Series will be 'object' instead of 'float64' in a future version. Specify a dtype explicitly to silence this warning.
This commit is contained in:
committed by
GitHub
parent
8715ddae58
commit
06619b198a
@ -659,7 +659,7 @@ class Candlestick(SeriesCommon):
|
||||
f'Trying to update tick of time "{pd.to_datetime(series["time"])}", '
|
||||
f'which occurs before the last bar time of '
|
||||
f'"{pd.to_datetime(self._last_bar["time"])}".')
|
||||
bar = pd.Series()
|
||||
bar = pd.Series(dtype='float64')
|
||||
if series['time'] == self._last_bar['time']:
|
||||
bar = self._last_bar
|
||||
bar['high'] = max(self._last_bar['high'], series['price'])
|
||||
|
||||
Reference in New Issue
Block a user