You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SPARK-36438][PYTHON] Support list-like Python objects for Series comparison
### What changes were proposed in this pull request?
This PR proposes to implement `Series` comparison with list-like Python objects.
Currently `Series` doesn't support the comparison to list-like Python objects such as `list`, `tuple`, `dict`, `set`.
**Before**
```python
>>> psser
0 1
1 2
2 3
dtype: int64
>>> psser == [3, 2, 1]
Traceback (most recent call last):
...
TypeError: The operation can not be applied to list.
...
```
**After**
```python
>>> psser
0 1
1 2
2 3
dtype: int64
>>> psser == [3, 2, 1]
0 False
1 True
2 False
dtype: bool
```
This was originally proposed in databricks/koalas#2022, and all reviews in origin PR has been resolved.
### Why are the changes needed?
To follow pandas' behavior.
### Does this PR introduce _any_ user-facing change?
Yes, the `Series` comparison with list-like Python objects now possible.
### How was this patch tested?
Unittests
Closes#34114 from itholic/SPARK-36438.
Authored-by: itholic <haejoon.lee@databricks.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
0 commit comments