[FEA] Support non-broadcasting (non-scalar) assignment on list columns
Open
0 - Backlog
feature request
Python
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.1k
- Avg merge
- 3d 6m
- Merged PRs (30d)
- 278
Description
Consider
```python
import cudf
s = cudf.Series([[1], [2], [3]])
g = cudf.Series([[4], [5]])
s.iloc[:2] = g
```
I would expect this to work and produce `[[4], [5], [3]]`. Instead, we get an error:
```
ValueError: Can not set
[
[
4
],
[
5
]
]
dtype: list into ListColumn
```
Indeed, the only things we can `__setitem__` into list columns are `cudf.NA` and a singleton list (treated as a `cudf.Scalar`) that is broadcast to all entries.
Contributor guide
Assessment
This issue has not been assessed yet.