有人可以提供一些如何applymap
在 cuDF 系列上使用该方法的示例吗?
以下是从文档中复制的,这里是文档的链接。
applymap(self, udf, out_dtype=None)
Apply a elemenwise function to transform the values in the Column.
The user function is expected to take one argument and return the result, which will be stored to the output Series. The function cannot reference globals except for other simple scalar objects.
Parameters
udf : function
Wrapped by `numba.cuda.jit` for call on the GPU as a device function.
out_dtype : numpy.dtype; optional
The dtype for use in the output. By default, the result will have the same dtype as the source.
Returns
result: Series
The mask and index are preserved.