Files | Enumerations | Functions
Extracting

Files

file  datetime.hpp
 DateTime column APIs.
 

Enumerations

enum class  cudf::datetime::datetime_component : uint8_t {
  YEAR , MONTH , DAY , WEEKDAY ,
  HOUR , MINUTE , SECOND , MILLISECOND ,
  MICROSECOND , NANOSECOND
}
 Types of datetime components that may be extracted.
 

Functions

std::unique_ptr< cudf::columncudf::datetime::extract_year (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts year from any datetime type and returns an int16_t cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::extract_month (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts month from any datetime type and returns an int16_t cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::extract_day (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts day from any datetime type and returns an int16_t cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::extract_weekday (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts a weekday from any datetime type and returns an int16_t cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::extract_hour (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts hour from any datetime type and returns an int16_t cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::extract_minute (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts minute from any datetime type and returns an int16_t cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::extract_second (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts second from any datetime type and returns an int16_t cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::extract_millisecond_fraction (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts millisecond fraction from any datetime type and returns an int16_t cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::extract_microsecond_fraction (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts microsecond fraction from any datetime type and returns an int16_t cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::extract_nanosecond_fraction (cudf::column_view const &column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts nanosecond fraction from any datetime type and returns an int16_t cudf::column. More...
 
std::unique_ptr< cudf::columncudf::datetime::extract_datetime_component (cudf::column_view const &column, datetime_component component, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Extracts the specified datetime component from any datetime type and returns an int16_t cudf::column. More...
 

Detailed Description

Function Documentation

◆ extract_datetime_component()

std::unique_ptr<cudf::column> cudf::datetime::extract_datetime_component ( cudf::column_view const &  column,
datetime_component  component,
rmm::cuda_stream_view  stream = cudf::get_default_stream(),
rmm::device_async_resource_ref  mr = cudf::get_current_device_resource_ref() 
)

Extracts the specified datetime component from any datetime type and returns an int16_t cudf::column.

Parameters
columncudf::column_view of the input datetime values
componentThe datetime component to extract
streamCUDA stream used for device memory operations and kernel launches
mrDevice memory resource used to allocate device memory of the returned column
Returns
cudf::column of the extracted int16_t datetime component
Exceptions
cudf::logic_errorif input column datatype is not TIMESTAMP

◆ extract_day()

std::unique_ptr<cudf::column> cudf::datetime::extract_day ( cudf::column_view const &  column,
rmm::cuda_stream_view  stream = cudf::get_default_stream(),
rmm::device_async_resource_ref  mr = cudf::get_current_device_resource_ref() 
)

Extracts day from any datetime type and returns an int16_t cudf::column.

Deprecated:
Deprecated in 24.12, to be removed in 25.02
Parameters
columncudf::column_view of the input datetime values
streamCUDA stream used for device memory operations and kernel launches
mrDevice memory resource used to allocate device memory of the returned column
Returns
cudf::column of the extracted int16_t days
Exceptions
cudf::logic_errorif input column datatype is not TIMESTAMP

◆ extract_hour()

std::unique_ptr<cudf::column> cudf::datetime::extract_hour ( cudf::column_view const &  column,
rmm::cuda_stream_view  stream = cudf::get_default_stream(),
rmm::device_async_resource_ref  mr = cudf::get_current_device_resource_ref() 
)

Extracts hour from any datetime type and returns an int16_t cudf::column.

Deprecated:
Deprecated in 24.12, to be removed in 25.02
Parameters
columncudf::column_view of the input datetime values
streamCUDA stream used for device memory operations and kernel launches
mrDevice memory resource used to allocate device memory of the returned column
Returns
cudf::column of the extracted int16_t hours
Exceptions
cudf::logic_errorif input column datatype is not TIMESTAMP

◆ extract_microsecond_fraction()

std::unique_ptr<cudf::column> cudf::datetime::extract_microsecond_fraction ( cudf::column_view const &  column,
rmm::cuda_stream_view  stream = cudf::get_default_stream(),
rmm::device_async_resource_ref  mr = cudf::get_current_device_resource_ref() 
)

Extracts microsecond fraction from any datetime type and returns an int16_t cudf::column.

A microsecond fraction is only the 3 digits that make up the microsecond portion of a duration. For example, the microsecond fraction of 1.234567890 seconds is 567.

Deprecated:
Deprecated in 24.12, to be removed in 25.02
Parameters
columncudf::column_view of the input datetime values
streamCUDA stream used for device memory operations and kernel launches
mrDevice memory resource used to allocate device memory of the returned column
Returns
cudf::column of the extracted int16_t microseconds
Exceptions
cudf::logic_errorif input column datatype is not TIMESTAMP

◆ extract_millisecond_fraction()

std::unique_ptr<cudf::column> cudf::datetime::extract_millisecond_fraction ( cudf::column_view const &  column,
rmm::cuda_stream_view  stream = cudf::get_default_stream(),
rmm::device_async_resource_ref  mr = cudf::get_current_device_resource_ref() 
)

Extracts millisecond fraction from any datetime type and returns an int16_t cudf::column.

A millisecond fraction is only the 3 digits that make up the millisecond portion of a duration. For example, the millisecond fraction of 1.234567890 seconds is 234.

Deprecated:
Deprecated in 24.12, to be removed in 25.02
Parameters
columncudf::column_view of the input datetime values
streamCUDA stream used for device memory operations and kernel launches
mrDevice memory resource used to allocate device memory of the returned column
Returns
cudf::column of the extracted int16_t milliseconds
Exceptions
cudf::logic_errorif input column datatype is not TIMESTAMP

◆ extract_minute()

std::unique_ptr<cudf::column> cudf::datetime::extract_minute ( cudf::column_view const &  column,
rmm::cuda_stream_view  stream = cudf::get_default_stream(),
rmm::device_async_resource_ref  mr = cudf::get_current_device_resource_ref() 
)

Extracts minute from any datetime type and returns an int16_t cudf::column.

Deprecated:
Deprecated in 24.12, to be removed in 25.02
Parameters
columncudf::column_view of the input datetime values
streamCUDA stream used for device memory operations and kernel launches
mrDevice memory resource used to allocate device memory of the returned column
Returns
cudf::column of the extracted int16_t minutes
Exceptions
cudf::logic_errorif input column datatype is not TIMESTAMP

◆ extract_month()

std::unique_ptr<cudf::column> cudf::datetime::extract_month ( cudf::column_view const &  column,
rmm::cuda_stream_view  stream = cudf::get_default_stream(),
rmm::device_async_resource_ref  mr = cudf::get_current_device_resource_ref() 
)

Extracts month from any datetime type and returns an int16_t cudf::column.

Deprecated:
Deprecated in 24.12, to be removed in 25.02
Parameters
columncudf::column_view of the input datetime values
streamCUDA stream used for device memory operations and kernel launches
mrDevice memory resource used to allocate device memory of the returned column
Returns
cudf::column of the extracted int16_t months
Exceptions
cudf::logic_errorif input column datatype is not TIMESTAMP

◆ extract_nanosecond_fraction()

std::unique_ptr<cudf::column> cudf::datetime::extract_nanosecond_fraction ( cudf::column_view const &  column,
rmm::cuda_stream_view  stream = cudf::get_default_stream(),
rmm::device_async_resource_ref  mr = cudf::get_current_device_resource_ref() 
)

Extracts nanosecond fraction from any datetime type and returns an int16_t cudf::column.

A nanosecond fraction is only the 3 digits that make up the nanosecond portion of a duration. For example, the nanosecond fraction of 1.234567890 seconds is 890.

Deprecated:
Deprecated in 24.12, to be removed in 25.02
Parameters
columncudf::column_view of the input datetime values
streamCUDA stream used for device memory operations and kernel launches
mrDevice memory resource used to allocate device memory of the returned column
Returns
cudf::column of the extracted int16_t nanoseconds
Exceptions
cudf::logic_errorif input column datatype is not TIMESTAMP

◆ extract_second()

std::unique_ptr<cudf::column> cudf::datetime::extract_second ( cudf::column_view const &  column,
rmm::cuda_stream_view  stream = cudf::get_default_stream(),
rmm::device_async_resource_ref  mr = cudf::get_current_device_resource_ref() 
)

Extracts second from any datetime type and returns an int16_t cudf::column.

Deprecated:
Deprecated in 24.12, to be removed in 25.02
Parameters
columncudf::column_view of the input datetime values
streamCUDA stream used for device memory operations and kernel launches
mrDevice memory resource used to allocate device memory of the returned column
Returns
cudf::column of the extracted int16_t seconds
Exceptions
cudf::logic_errorif input column datatype is not TIMESTAMP

◆ extract_weekday()

std::unique_ptr<cudf::column> cudf::datetime::extract_weekday ( cudf::column_view const &  column,
rmm::cuda_stream_view  stream = cudf::get_default_stream(),
rmm::device_async_resource_ref  mr = cudf::get_current_device_resource_ref() 
)

Extracts a weekday from any datetime type and returns an int16_t cudf::column.

Deprecated:
Deprecated in 24.12, to be removed in 25.02
Parameters
columncudf::column_view of the input datetime values
streamCUDA stream used for device memory operations and kernel launches
mrDevice memory resource used to allocate device memory of the returned column
Returns
cudf::column of the extracted int16_t days
Exceptions
cudf::logic_errorif input column datatype is not TIMESTAMP

◆ extract_year()

std::unique_ptr<cudf::column> cudf::datetime::extract_year ( cudf::column_view const &  column,
rmm::cuda_stream_view  stream = cudf::get_default_stream(),
rmm::device_async_resource_ref  mr = cudf::get_current_device_resource_ref() 
)

Extracts year from any datetime type and returns an int16_t cudf::column.

Deprecated:
Deprecated in 24.12, to be removed in 25.02
Parameters
columncudf::column_view of the input datetime values
streamCUDA stream used for device memory operations and kernel launches
mrDevice memory resource used to allocate device memory of the returned column
Returns
cudf::column of the extracted int16_t years
Exceptions
cudf::logic_errorif input column datatype is not TIMESTAMP