cudf.DataFrame.to_dlpack#

DataFrame.to_dlpack()#

Converts a cuDF object into a DLPack tensor.

DLPack is an open-source memory tensor structure: dmlc/dlpack.

This function takes a cuDF object and converts it to a PyCapsule object which contains a pointer to a DLPack tensor. This function deep copies the data into the DLPack tensor from the cuDF object.

Parameters:
cudf_objDataFrame, Series, Index, or Column
Returns:
pycapsule_objPyCapsule

Output DLPack tensor pointer which is encapsulated in a PyCapsule object.