[BUG] Setitem on struct columns picks out incorrect pieces when indexing of rvalue is not from zero.
Open
0 - Backlog
bug
Python
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.1k
- Avg merge
- 3d 6m
- Merged PRs (30d)
- 278
Description
**Describe the bug**
```python
import cudf
s = cudf.Series([{"a": 1}, {"a": 2}, {"a": 3}])
g = cudf.Series([{"a": 4}, {"a": 5}, {"a": 6}])
s.iloc[1:2] = g.iloc[2:3]
s.iloc[1:2]
# 1 {'a': 4}
# dtype: struct
g.iloc[2:3]
# 2 {'a': 6}
# dtype: struct
# An even more fun:
x = g.iloc[2:3].copy(deep=True)
s.iloc[1] = x.iloc[0]
s.iloc[1] # => {'a': 6} Good!
s.iloc[1] = x.iloc[:]
s.iloc[1] # => {'a': 4} What!
```
Oops.
Contributor guide
Assessment
This issue has not been assessed yet.