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] DataFrameGroupBy object has no attribute cumprod #17648

Open
MarcoGorelli opened this issue Dec 21, 2024 · 0 comments
Open

[BUG] DataFrameGroupBy object has no attribute cumprod #17648

MarcoGorelli opened this issue Dec 21, 2024 · 0 comments
Labels
bug Something isn't working Python Affects Python cuDF API.

Comments

@MarcoGorelli
Copy link
Contributor

MarcoGorelli commented Dec 21, 2024

Describe the bug
DataFrameGroupBy object has no attribute cumprod

Steps/Code to reproduce bug

df = cudf.DataFrame({'a': [1,1,2], 'b': [4,5,6]})
df.groupby('a')[['b']].cumprod()

---------------------------------------------------------------------------

KeyError                                  Traceback (most recent call last)

[/usr/local/lib/python3.10/dist-packages/cudf/utils/utils.py](https://localhost:8080/#) in __getattr__(self, key)
    227         try:
--> 228             return self[key]
    229         except KeyError:

8 frames

KeyError: 'cumprod'


During handling of the above exception, another exception occurred:

AttributeError                            Traceback (most recent call last)

[/usr/local/lib/python3.10/dist-packages/cudf/utils/utils.py](https://localhost:8080/#) in __getattr__(self, key)
    228             return self[key]
    229         except KeyError:
--> 230             raise AttributeError(
    231                 f"{type(self).__name__} object has no attribute {key}"
    232             )

AttributeError: DataFrameGroupBy object has no attribute cumprod

Expected behavior
same as pandas

 	b
0 	4
1 	20
2 	6

spotted in Narwhals

Environment overview (please complete the following information)

  • Environment location: [Bare-metal, Docker, Cloud(specify cloud provider)]
  • Method of cuDF install: [conda, Docker, or from source]
    • If method of install is [Docker], provide docker pull & docker run commands used

Environment details
Please run and paste the output of the cudf/print_env.sh script here, to gather any other relevant environment details

google colab, 24.10.01

Additional context
Add any other context about the problem here.

@MarcoGorelli MarcoGorelli added the bug Something isn't working label Dec 21, 2024
@galipremsagar galipremsagar added the Python Affects Python cuDF API. label Dec 23, 2024
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
Status: Todo
Development

No branches or pull requests

2 participants