Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Comparison between Series and DataFrame fails when LHS is a Series #7385

Closed
brandon-b-miller opened this issue Feb 16, 2021 · 0 comments · Fixed by #7491
Closed

[BUG] Comparison between Series and DataFrame fails when LHS is a Series #7385

brandon-b-miller opened this issue Feb 16, 2021 · 0 comments · Fixed by #7491
Assignees
Labels
bug Something isn't working Python Affects Python cuDF API.

Comments

@brandon-b-miller
Copy link
Contributor

Describe the bug
Comparisons (eq, neq, ge, etc) fail between a Series and a DataFrame when the series is the left operand.

Steps/Code to reproduce bug

lhs = cudf.Series([1,2,3])
rhs = cudf.DataFrame({'a': [1,2,3]})
lhs == rhs
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/nfs/brmiller/repos/cudf/python/cudf/cudf/core/series.py", line 1611, in __eq__
    return self._binaryop(other, "eq")
  File "/home/nfs/brmiller/anaconda3/envs/cudf_dev/lib/python3.7/contextlib.py", line 74, in inner
    return func(*args, **kwds)
  File "/home/nfs/brmiller/repos/cudf/python/cudf/cudf/core/series.py", line 1187, in _binaryop
    return other._apply_op(self, fn)
  File "/home/nfs/brmiller/repos/cudf/python/cudf/cudf/core/dataframe.py", line 1359, in _apply_op
    result[col] = getattr(self[col], fn)(other[k])
TypeError: getattr(): attribute name must be string

It's supposed to be tested here but it currently isn't because apparently I broke it 15 months ago.

Expected behavior

       a      0      1      2
0  False  False  False  False
1  False  False  False  False
2  False  False  False  False

Environment overview (please complete the following information)

  • Environment location: Bare-metal
  • Method of cuDF install: Source
@brandon-b-miller brandon-b-miller added bug Something isn't working Python Affects Python cuDF API. labels Feb 16, 2021
@brandon-b-miller brandon-b-miller self-assigned this Feb 16, 2021
rapids-bot bot pushed a commit that referenced this issue Mar 18, 2021
Fixes #7385

Authors:
  - @brandon-b-miller

Approvers:
  - GALI PREM SAGAR (@galipremsagar)
  - Michael Wang (@isVoid)

URL: #7491
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant