base module¶
Base classes and functions for resampling.
Resampler class¶
Class that exposes methods to resample index.
Args
source_index:index_like- Index being resampled.
target_index:index_like- Index resulted from resampling.
source_freq:frequency_likeorbool-
Frequency or date offset of the source index.
Set to False to force-set the frequency to None.
target_freq:frequency_likeorbool-
Frequency or date offset of the target index.
Set to False to force-set the frequency to None.
silence_warnings:bool- Whether to silence all warnings.
Superclasses
Inherited members
- Cacheable.get_ca_setup()
- Chainable.pipe()
- Configured.config
- Configured.copy()
- Configured.equals()
- Configured.get_writeable_attrs()
- Configured.prettify()
- Configured.rec_state
- Configured.replace()
- Configured.resolve_merge_kwargs()
- Configured.update_config()
- HasSettings.get_path_setting()
- HasSettings.get_path_settings()
- HasSettings.get_setting()
- HasSettings.get_settings()
- HasSettings.has_path_setting()
- HasSettings.has_path_settings()
- HasSettings.has_setting()
- HasSettings.has_settings()
- HasSettings.reset_settings()
- HasSettings.resolve_setting()
- HasSettings.resolve_settings_paths()
- HasSettings.set_settings()
- Pickleable.decode_config()
- Pickleable.decode_config_node()
- Pickleable.dumps()
- Pickleable.encode_config()
- Pickleable.encode_config_node()
- Pickleable.file_exists()
- Pickleable.getsize()
- Pickleable.load()
- Pickleable.loads()
- Pickleable.modify_state()
- Pickleable.resolve_file_path()
- Pickleable.save()
from_date_range class method¶
Build Resampler from date_range().
from_pd_resample class method¶
Resampler.from_pd_resample(
source_index,
*args,
source_freq=None,
silence_warnings=True,
**kwargs
)
Build Resampler from pandas.DataFrame.resample.
from_pd_resampler class method¶
Build Resampler from pandas.core.resample.Resampler.
get_lbound_index class method¶
Get the left bound of a datetime index.
If freq is None, calculates the leftmost bound.
get_np_source_freq method¶
Frequency or date offset of the source index in NumPy format.
get_np_target_freq method¶
Frequency or date offset of the target index in NumPy format.
get_rbound_index class method¶
Get the right bound of a datetime index.
If freq is None, calculates the rightmost bound.
index_difference method¶
last_before_target_index method¶
See last_before_target_index_nb().
map_bounds_to_source_ranges class method¶
Resampler.map_bounds_to_source_ranges(
source_index=None,
target_lbound_index=None,
target_rbound_index=None,
closed_lbound=True,
closed_rbound=False,
skip_not_found=False,
jitted=None
)
See map_bounds_to_source_ranges_nb().
Either target_lbound_index or target_rbound_index must be set. Set target_lbound_index and target_rbound_index to 'pandas' to use Resampler.get_lbound_index() and Resampler.get_rbound_index() respectively. Also, both allow providing a single datetime string and will automatically broadcast to the Resampler.target_index.
map_index_to_source_ranges method¶
See map_index_to_source_ranges_nb().
If Resampler.target_freq is a date offset, sets is to None and gives a warning. Raises another warning is target_freq is None.
map_to_target_index method¶
Resampler.map_to_target_index(
before=False,
raise_missing=True,
return_index=True,
jitted=None,
silence_warnings=None
)
resample_source_mask method¶
See resample_source_mask_nb().
silence_warnings property¶
Frequency or date offset of the target index.
source_freq property¶
Frequency or date offset of the source index.
source_index property¶
Index being resampled.
source_lbound_index property¶
Get the left bound of the source datetime index.
source_rbound_index property¶
Get the right bound of the source datetime index.
target_freq property¶
Frequency or date offset of the target index.
target_index property¶
Index resulted from resampling.
target_lbound_index property¶
Get the left bound of the target datetime index.
target_rbound_index property¶
Get the right bound of the target datetime index.