[FEA] Handle selected functions that don't have bytecode in `Series.apply`
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.1k
- Avg merge
- 3d 6m
- Merged PRs (30d)
- 278
Description
**Is your feature request related to a problem? Please describe.**
During discussion in https://github.com/rapidsai/cudf/pull/11578 we realized that users might try and pass several commonly used python functions that don't necessarily have bytecode directly to `Series.apply`. For instance, using `float` dispatches to a C-level `__init__` method and thus has no bytecode for numba to build a function out of.
**Describe the solution you'd like**
It would be nice if this worked:
```python
cudf.Series([1,2,3]).apply(float)
# [1.0, 2.0, 3.0]
```
We should be able to use
- int
- float
- bool
We could also add:
- Numpy dtypes
- string?
**Describe alternatives you've considered**
Users should just call `astype` but this seems like plausible usage.
**Additional context**
Came up during https://github.com/rapidsai/cudf/pull/11578#pullrequestreview-1082926062
Contributor guide
Assessment
This issue has not been assessed yet.