datetime#

pylibcudf.datetime.DatetimeComponent#

See also cudf::datetime_component.

Enum members

  • YEAR

  • MONTH

  • DAY

  • WEEKDAY

  • HOUR

  • MINUTE

  • SECOND

  • MILLISECOND

  • MICROSECOND

  • NANOSECOND

pylibcudf.datetime.RoundingFrequency#

See also cudf::rounding_frequency.

Enum members

  • DAY

  • HOUR

  • MINUTE

  • SECOND

  • MILLISECOND

  • MICROSECOND

  • NANOSECOND

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.

Returns:
Column

Column of computed timestamps.

pylibcudf.datetime.ceil_datetimes(Column input, rounding_frequency freq) Column#

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.

Returns:
Column

Column of the same datetime resolution as the input column.

pylibcudf.datetime.day_of_year(Column input) Column#

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.

Returns:
Column

Column of day numbers.

pylibcudf.datetime.days_in_month(Column input) Column#

Extract the number of days in the month.

For details, see days_in_month().

Parameters:
inputColumn

The column of input datetime values.

Returns:
Column

Column of the number of days in the given month.

pylibcudf.datetime.extract_datetime_component(Column input, datetime_component component) Column#

Extract a datetime component from a datetime column.

For details, see cudf::extract_datetime_component().

Parameters:
inputColumn

The column to extract the component from.

componentDatetimeComponent

The datetime component to extract.

Returns:
Column

Column with the extracted component.

pylibcudf.datetime.extract_microsecond_fraction(Column input) Column#

Extract the microsecond fraction from a datetime column.

For details, see extract_microsecond_fraction().

Parameters:
inputColumn

The column to extract the microsecond fraction from.

Returns:
Column

Column with the extracted microsecond fractions.

pylibcudf.datetime.extract_millisecond_fraction(Column input) Column#

Extract the millisecond from a datetime column.

For details, see extract_millisecond_fraction().

Parameters:
inputColumn

The column to extract the millisecond from.

Returns:
Column

Column with the extracted milliseconds.

pylibcudf.datetime.extract_nanosecond_fraction(Column input) Column#

Extract the nanosecond fraction from a datetime column.

For details, see extract_nanosecond_fraction().

Parameters:
inputColumn

The column to extract the nanosecond fraction from.

Returns:
Column

Column with the extracted nanosecond fractions.

pylibcudf.datetime.extract_quarter(Column input) Column#

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.

Returns:
Column

Column indicating which quarter the date is in.

pylibcudf.datetime.floor_datetimes(Column input, rounding_frequency freq) Column#

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.

Returns:
Column

Column of the same datetime resolution as the input column.

pylibcudf.datetime.is_leap_year(Column input) Column#

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.

Returns:
Column

Column of bools indicating whether the given year is a leap year.

pylibcudf.datetime.last_day_of_month(Column input) Column#

Computes the last day of the month.

For details, see last_day_of_month().

Parameters:
inputColumn

The column of input datetime values.

Returns:
Column

Column of TIMESTAMP_DAYS representing the last day of the month.

pylibcudf.datetime.round_datetimes(Column input, rounding_frequency freq) Column#

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.

Returns:
Column

Column of the same datetime resolution as the input column.