Temporal expressions
Dates, times, timestamps and intervals.
TimeValue
Methods
Name | Description |
---|---|
hour | Extract the hour component. |
microsecond | Extract the microsecond component. |
millisecond | Extract the millisecond component. |
minute | Extract the minute component. |
second | Extract the second component. |
time | Return the time component of the expression. |
truncate | Truncate the expression to a time expression in units of unit . |
hour
Extract the hour component.
microsecond
Extract the microsecond component.
millisecond
Extract the millisecond component.
minute
Extract the minute component.
second
Extract the second component.
time
Return the time component of the expression.
Returns
Name | Type | Description |
---|---|---|
TimeValue | The time component of self |
truncate
Truncate the expression to a time expression in units of unit
.
Commonly used for time series resampling.
Parameters
Name | Type | Description | Default |
---|---|---|---|
unit | Literal[‘h’, ‘m’, ‘s’, ‘ms’, ‘us’, ‘ns’] | The unit to truncate to | required |
Returns
Name | Type | Description |
---|---|---|
TimeValue | self truncated to unit |
DateValue
Methods
Name | Description |
---|---|
day | Extract the day component. |
day_of_year | Extract the day of the year component. |
epoch_seconds | Extract UNIX epoch in seconds. |
month | Extract the month component. |
quarter | Extract the quarter component. |
truncate | Truncate date expression to units of unit . |
week_of_year | Extract the week of the year component. |
year | Extract the year component. |
day
Extract the day component.
day_of_year
Extract the day of the year component.
epoch_seconds
Extract UNIX epoch in seconds.
month
Extract the month component.
quarter
Extract the quarter component.
truncate
Truncate date expression to units of unit
.
Parameters
Name | Type | Description | Default |
---|---|---|---|
unit | Literal[‘Y’, ‘Q’, ‘M’, ‘W’, ‘D’] | Unit to truncate arg to | required |
Returns
Name | Type | Description |
---|---|---|
DateValue | Truncated date value expression |
week_of_year
Extract the week of the year component.
year
Extract the year component.
DayOfWeek
A namespace of methods for extracting day of week information.
Methods
Name | Description |
---|---|
full_name | Get the name of the day of the week. |
index | Get the index of the day of the week. |
full_name
Get the name of the day of the week.
Returns
Name | Type | Description |
---|---|---|
StringValue | The name of the day of the week |
index
Get the index of the day of the week.
Ibis follows the pandas
convention for day numbering: Monday = 0 and Sunday = 6.
Returns
Name | Type | Description |
---|---|---|
IntegerValue | The index of the day of the week. |
TimestampValue
Methods
Name | Description |
---|---|
date | Return the date component of the expression. |
truncate | Truncate timestamp expression to units of unit . |
date
Return the date component of the expression.
Returns
Name | Type | Description |
---|---|---|
DateValue | The date component of self |
truncate
Truncate timestamp expression to units of unit
.
Parameters
Name | Type | Description | Default |
---|---|---|---|
unit | Literal[‘Y’, ‘Q’, ‘M’, ‘W’, ‘D’, ‘h’, ‘m’, ‘s’, ‘ms’, ‘us’, ‘ns’] | Unit to truncate to | required |
Returns
Name | Type | Description |
---|---|---|
TimestampValue | Truncated timestamp expression |
IntervalValue
Methods
Name | Description |
---|---|
to_unit |