semantique.extent.TemporalExtent

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 includes pandas.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.

__init__(*bounds, **kwargs)[source]#

Methods

__init__(*bounds, **kwargs)

discretize([resolution, tz])

Discretize the temporal extent into an array.

Attributes

end

Upper bound of the extent.

start

Lower bound of the extent.

type

Type of the extent, either interval or instant.

tz

Object representing the timezone of the extent.

tzname

Name of the timezone of the extent.