[FEA] Define unary operations like `__neg__`, `__pos__`, `__abs__` and `__invert__` for `Column`.
Open
feature request
Python
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.1k
- Avg merge
- 3d 6m
- Merged PRs (30d)
- 278
Description
Currently, invoking Python's builtin unary operators on columns raises:
```python
>>> s = cudf.Series([1, 2, 3])
>>> -s._column # TypeError
```
This came up in https://github.com/rapidsai/cudf/pull/10564.
A workaround is to do for example, `s._column.unary_operator("abs")` or `0 - s._column`, but it would be nice to do this in a more Pythonic way.
Contributor guide
Assessment
This issue has not been assessed yet.