snapToRegularInterval()
Signature:
snap_to_regular(
interval: Union[
hec.Interval,
str
],
offset: Union[
hec.TimeSpan,
datetime.timedelta,
str,
NoneType
] = None,
backward: Union[
hec.TimeSpan,
datetime.timedelta,
str,
NoneType
] = None,
forward: Union[
hec.TimeSpan,
datetime.timedelta,
str,
NoneType
] = None,
in_place: bool = False
) -> TimeSeries
The hec-python-library equivalent of Jython method snapToRegularInterval():
If in_place=True, the instance itself
is modified. In this case the returned value (which can be ignored in python) is the modified instance, which can be used in chaining
methods.
Example:
ts2 = ts1.snap_to_regular("1Hour", None, "PT5M", "PT5M")
Signature:
isnap_to_regular(
interval: Union[
hec.Interval,
str
],
offset: Union[
hec.TimeSpan,
datetime.timedelta,
str,
NoneType
] = None,
backward: Union[
hec.TimeSpan,
datetime.timedelta,
str,
NoneType
] = None,
forward: Union[
hec.TimeSpan,
datetime.timedelta,
str,
NoneType
] = None,
) -> TimeSeries
Convenience method for calling snap_to_regular(...) with inplace=True.
Example:
ts.isnap_to_regular("1Hour", None, "PT5M", "PT5M")