temporian.EventSet.calendar_day_of_month #
calendar_day_of_month(
tz: Union[str, float, int] = 0
) -> EventSetOrNode
Obtains the day of month 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 1 and 31.
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
>>> a = tp.event_set(
... timestamps=["2023-02-04", "2023-02-20", "2023-03-01", "2023-05-07"],
... )
>>> b = a.calendar_day_of_month()
>>> b
indexes: ...
features: [('calendar_day_of_month', int32)]
events:
(4 events):
timestamps: [...]
'calendar_day_of_month': [ 4 20 1 7]
...
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 day of the month each timestamp
in |