[BUG] Series.equals() raises error with ListColumns, while DataFrame.equals() works
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.1k
- Avg merge
- 3d 6m
- Merged PRs (30d)
- 278
Description
**Describe the bug**
When trying to compare two Series with ListColumns, the following error is displayed:
```
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
in
4 series2 = cudf.Series({1: [10, 20, 30]})
5
----> 6 series1.equals(series2)
/opt/conda/envs/rapids/lib/python3.7/site-packages/cudf/core/series.py in equals(self, other)
1499 if other is None or len(self) != len(other):
1500 return False
-> 1501 return self._binaryop(other, "eq").min()
1502
1503 def ne(self, other, fill_value=None, axis=0):
/opt/conda/envs/rapids/lib/python3.7/contextlib.py in inner(*args, **kwds)
72 def inner(*args, **kwds):
73 with self._recreate_cm():
---> 74 return func(*args, **kwds)
75 return inner
76
/opt/conda/envs/rapids/lib/python3.7/site-packages/cudf/core/series.py in _binaryop(self, other, fn, fill_value, reflect)
1081 rhs = rhs.fillna(fill_value)
1082
-> 1083 outcol = lhs._column.binary_operator(fn, rhs, reflect=reflect)
1084 result = lhs._copy_construct(data=outcol, name=result_name)
1085 return result
AttributeError: 'ListColumn' object has no attribute 'binary_operator'
```
**Steps/Code to reproduce bug**
```
import cudf
series1 = cudf.Series({1: [10, 20, 30]})
series2 = cudf.Series({1: [10, 20, 30]})
series1.equals(series2)
```
**Expected behaviour**
No error message. It works with DataFrames instead:
```
import cudf
df1 = cudf.DataFrame({1: [10, 20, 30], 2: [20, 30, 40]})
df2 = cudf.DataFrame({1: [10, 20, 30], 2: [20, 30, 40]})
df1.equals(df2)
```
**Environment overview (please complete the following information)**
DGX1
**Environment details**
cuDF version: 0.15.0a+4666.g1778921b0
Contributor guide
Assessment
This issue has not been assessed yet.