diff --git a/edisgo/network/timeseries.py b/edisgo/network/timeseries.py index 39cc7c364..6e689a928 100644 --- a/edisgo/network/timeseries.py +++ b/edisgo/network/timeseries.py @@ -2147,8 +2147,9 @@ def _check_if_components_exist( def resample_timeseries(self, method: str = "ffill", freq: str = "15min"): """ - Returns timeseries resampled from hourly resolution to 15 minute resolution. - #ToDo: Adjust docstring + Returns timeseries resampled to a desired resolution. Both up- and down- + sampling methods are available. + Parameters ---------- method : str, optional @@ -2167,8 +2168,7 @@ def resample_timeseries(self, method: str = "ffill", freq: str = "15min"): https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.interpolate.html freq : str, optional - Frequency that timeseries is resampled to. Can be any frequency up to one - hour. Offset aliases can be found here: + Frequency that timeseries is resampled to. Offset aliases can be found here: https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases 15 minutes is the default. @@ -2219,8 +2219,10 @@ def resample_timeseries(self, method: str = "ffill", freq: str = "15min"): setattr( self, attr, df_dict[attr].resample(freq, closed="left").bfill() ) - else: # ToDo: Logger Warning: method not implemented - print(" ") + else: + raise NotImplementedError( + 'Resampling method "{}" is not implemented.'.format(method) + ) else: # down-sampling for attr in attrs: setattr(