semantique.extent.TemporalExtent#
- class semantique.extent.TemporalExtent(*bounds, **kwargs)[source]#
Dict-like representation of a temporal extent.
- Parameters:
*bounds – Boundaries of the temporal extent. Should be given as objects that can be read by the initializer of
pandas.Timestamp
. This includespandas.Timestamp
objects themselves, as well as text representations of time instants in different formats. If the temporal extent is a single time instant, a single boundary may be given. If the temporal extent is a time interval, the boundaries should be provided as (start, end). This interval is assumed to be closed at both sides.**kwargs – Additional keyword arguments forwarded to the initializer of
pandas.Timestamp
.
- Raises:
exceptions.MixedTimeZonesError – If the given boundaries have differing timezone information attached.
Methods
__init__
(*bounds, **kwargs)discretize
([resolution, tz])Discretize the temporal extent into an array.
Attributes
Upper bound of the extent.
Lower bound of the extent.
type
Type of the extent, either interval or instant.
Object representing the timezone of the extent.
tzname
Name of the timezone of the extent.