pastas.timeseries_utils.get_sample#

pastas.timeseries_utils.get_sample(tindex: pandas.DatetimeIndex, ref_tindex: pandas.DatetimeIndex) pandas.DatetimeIndex#

Sample the index of a pandas Series or DataFrame so that the frequency is not higher than the frequency of ref_tindex.

Parameters:
Returns:

The sampled index, consisting of a subset of the original index tindex. The values in tindex that are closest to ref_index are returned.

Return type:

pandas.DatetimeIndex

Notes

Find the index closest to the ref_tindex, and then return a selection of the index.