pastas.timeseries_utils.get_equidistant_series_nearest ====================================================== .. py:function:: pastas.timeseries_utils.get_equidistant_series_nearest(series: pandas.Series, freq: str, minimize_data_loss: bool = False) -> pandas.Series Get equidistant time series using nearest reindexing. This method will shift observations to the nearest equidistant timestep to create an equidistant time series, if necessary. Each observation is guaranteed to only be used once in the equidistant time series. :param series: original (non-equidistant) time series :type series: pandas.Series :param freq: frequency of the new equidistant time series (i.e. "h", "D", "7D", etc.) :type freq: str :param minimize_data_loss: if set to True, method will attempt use any unsampled points from original time series to fill some remaining NaNs in the new equidistant time series. Default is False. This only happens in rare cases. :type minimize_data_loss: bool, optional :returns: **s** -- equidistant time series :rtype: pandas.Series .. rubric:: Notes This method creates an equidistant time series with specified freq using the nearest sampling (meaning observations can be shifted in time), with additional filling logic that ensures each original measurement is only included once in the new time series. Values are filled as close as possible to their original timestamp in the new equidistant time series. .. !! processed by numpydoc !!