temporian.EventSet.calendar_minute #
calendar_minute(
tz: Union[str, float, int] = 0
) -> EventSetOrNode
Obtain the minute the timestamps in an
EventSet
's sampling are in.
Features in the input are ignored, only the timestamps are used and
they must be unix timestamps (is_unix_timestamp=True
).
Output feature contains numbers between 0 and 59.
By default, the timezone is UTC unless the tz
argument is specified,
as an offset in hours or a timezone name. See
EventSet.calendar_hour()
for an
example using timezones.
Usage example
>>> from datetime import datetime
>>> a = tp.event_set(
... timestamps=[datetime(2020,1,1,18,30), datetime(2020,1,1,23,59)],
... name='random_hours'
... )
>>> b = a.calendar_minute()
>>> b
indexes: ...
features: [('calendar_minute', int32)]
events:
(2 events):
timestamps: [...]
'calendar_minute': [30 59]
...
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tz |
Union[str, float, int]
|
timezone name (see |
0
|
Returns:
Type | Description |
---|---|
EventSetOrNode
|
EventSet with a single feature with the minute each timestamp in
|