datetime#
- pylibcudf.datetime.DatetimeComponent#
See also
datetime_component.Enum members
YEARMONTHDAYWEEKDAYHOURMINUTESECONDMILLISECONDMICROSECONDNANOSECOND
- pylibcudf.datetime.RoundingFrequency#
See also
rounding_frequency.Enum members
DAYHOURMINUTESECONDMILLISECONDMICROSECONDNANOSECOND
- pylibcudf.datetime.add_calendrical_months(
- signatures,
- args,
- kwargs,
- defaults,
- _fused_sigindex={},
Adds or subtracts a number of months from the datetime type and returns a timestamp column that is of the same type as the input timestamps column.
For details, see
add_calendrical_months().- Parameters:
- inputColumn
The column of input timestamp values.
- monthsColumnOrScalar
The number of months to add.
- streamStream | None
CUDA stream on which to perform the operation.
- Returns:
- Column
Column of computed timestamps.
- pylibcudf.datetime.ceil_datetimes(
- Column input,
- rounding_frequency freq,
- stream=None,
- DeviceMemoryResource mr=None,
Round datetimes up to the nearest multiple of the given frequency.
For details, see
ceil_datetimes().- Parameters:
- inputColumn
The column of input datetime values.
- freqrounding_frequency
The frequency to round up to.
- streamStream | None
CUDA stream on which to perform the operation.
- Returns:
- Column
Column of the same datetime resolution as the input column.
- pylibcudf.datetime.day_of_year(
- Column input,
- stream=None,
- DeviceMemoryResource mr=None,
Computes the day number since the start of the year from the datetime. The value is between [1, {365-366}].
For details, see
day_of_year().- Parameters:
- inputColumn
The column of input datetime values.
- streamStream | None
CUDA stream on which to perform the operation.
- Returns:
- Column
Column of day numbers.
- pylibcudf.datetime.days_in_month(
- Column input,
- stream=None,
- DeviceMemoryResource mr=None,
Extract the number of days in the month.
For details, see
days_in_month().- Parameters:
- inputColumn
The column of input datetime values.
- streamStream | None
CUDA stream on which to perform the operation.
- Returns:
- Column
Column of the number of days in the given month.
- pylibcudf.datetime.extract_datetime_component(
- Column input,
- datetime_component component,
- stream=None,
- DeviceMemoryResource mr=None,
Extract a datetime component from a datetime column.
For details, see
extract_datetime_component().- Parameters:
- inputColumn
The column to extract the component from.
- componentDatetimeComponent
The datetime component to extract.
- streamStream | None
CUDA stream on which to perform the operation.
- Returns:
- Column
Column with the extracted component.
- pylibcudf.datetime.extract_quarter(
- Column input,
- stream=None,
- DeviceMemoryResource mr=None,
Returns the quarter (ie. a value from {1, 2, 3, 4}) that the date is in.
For details, see
extract_quarter().- Parameters:
- inputColumn
The column of input datetime values.
- streamStream | None
CUDA stream on which to perform the operation.
- Returns:
- Column
Column indicating which quarter the date is in.
- pylibcudf.datetime.floor_datetimes(
- Column input,
- rounding_frequency freq,
- stream=None,
- DeviceMemoryResource mr=None,
Round datetimes down to the nearest multiple of the given frequency.
For details, see
floor_datetimes().- Parameters:
- inputColumn
The column of input datetime values.
- freqrounding_frequency
The frequency to round down to.
- streamStream | None
CUDA stream on which to perform the operation.
- Returns:
- Column
Column of the same datetime resolution as the input column.
- pylibcudf.datetime.is_leap_year(
- Column input,
- stream=None,
- DeviceMemoryResource mr=None,
Check if the year of the given date is a leap year.
For details, see
is_leap_year().- Parameters:
- inputColumn
The column of input datetime values.
- streamStream | None
CUDA stream on which to perform the operation.
- Returns:
- Column
Column of bools indicating whether the given year is a leap year.
- pylibcudf.datetime.last_day_of_month(
- Column input,
- stream=None,
- DeviceMemoryResource mr=None,
Computes the last day of the month.
For details, see
last_day_of_month().- Parameters:
- inputColumn
The column of input datetime values.
- streamStream | None
CUDA stream on which to perform the operation.
- Returns:
- Column
Column of
TIMESTAMP_DAYSrepresenting the last day of the month.
- pylibcudf.datetime.round_datetimes(
- Column input,
- rounding_frequency freq,
- stream=None,
- DeviceMemoryResource mr=None,
Round datetimes to the nearest multiple of the given frequency.
For details, see
round_datetimes().- Parameters:
- inputColumn
The column of input datetime values.
- freqrounding_frequency
The frequency to round to.
- streamStream | None
CUDA stream on which to perform the operation.
- Returns:
- Column
Column of the same datetime resolution as the input column.