trendminer.sdk.commons.period module

class trendminer.sdk.commons.period.Period(duration: timedelta | str)

Bases: ABC

Period structure

duration

Duration of the intervals

Type:

timedelta or str

abstract property end: datetime

End of the Period.

Returns:

End date

Return type:

datetime

abstract freeze() Interval

Freeze the relative period into a regular Period instance with fixed start and end dates.

Returns:

Interval of the frozen period

Return type:

Interval

abstract split(max_size: timedelta | str) list[trendminer.sdk.commons.interval.Interval]

Splits a period into multiple parts.

Parameters:

max_size (timedelta or str) – Maximum duration size during the split

Returns:

List of intervals based on split criteria

Return type:

list

abstract property start: datetime

Start of the Period.

Returns:

Start date

Return type:

datetime