ffill and bfill now return TimeSeries objects instead of lists
This commit is contained in:
parent
2c1d508734
commit
439fa86b5c
@ -75,7 +75,7 @@ class TimeSeries(TimeSeriesCore):
|
||||
self.time_series = new_ts
|
||||
return None
|
||||
|
||||
return new_ts
|
||||
return TimeSeries(new_ts, frequency=self.frequency.symbol)
|
||||
|
||||
def bfill(self, inplace: bool = False, limit: int = None) -> Union[TimeSeries, None]:
|
||||
"""Backward fill missing dates in the time series
|
||||
@ -109,7 +109,7 @@ class TimeSeries(TimeSeriesCore):
|
||||
self.time_series = new_ts
|
||||
return None
|
||||
|
||||
return new_ts
|
||||
return TimeSeries(new_ts, frequency=self.frequency.symbol)
|
||||
|
||||
def calculate_returns(
|
||||
self,
|
||||
|
Loading…
Reference in New Issue
Block a user