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

AttributeError: 'Series' object has no attribute 'std' #233

Closed
skrawcz opened this issue Jul 20, 2023 · 6 comments · Fixed by #236
Closed

AttributeError: 'Series' object has no attribute 'std' #233

skrawcz opened this issue Jul 20, 2023 · 6 comments · Fixed by #236

Comments

@skrawcz
Copy link

skrawcz commented Jul 20, 2023

Is this expected behavior?

Repro:

import dask_expr as dx
df = dx.datasets.timeseries(dtypes={"name": "string", "id": int, "quantity": int, "spend": float})
df["quantity"].std()

Stacktrace:

Traceback (most recent call last):
  File "lib/python3.9/site-packages/dask_expr/_collection.py", line 175, in __getattr__
    val = getattr(self.expr, key)
  File "lib/python3.9/site-packages/dask_expr/_expr.py", line 148, in __getattr__
    raise err
  File "lib/python3.9/site-packages/dask_expr/_expr.py", line 137, in __getattr__
    return object.__getattribute__(self, key)
AttributeError: 'Projection' object has no attribute 'std'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "lib/python3.9/site-packages/dask_expr/_collection.py", line 181, in __getattr__
    raise err
  File "lib/python3.9/site-packages/dask_expr/_collection.py", line 170, in __getattr__
    return object.__getattribute__(self, key)
AttributeError: 'Series' object has no attribute 'std'
@phofl
Copy link
Collaborator

phofl commented Jul 20, 2023

Hi, thanks for your report and thanks for trying dask-expr!

std isn't implemented yet since it goes through dask.array code that we don't support yet. So for now this is the expected behaviour. Sorry.

Edit: Same vor var

@mrocklin
Copy link
Member

mrocklin commented Jul 20, 2023 via email

@skrawcz
Copy link
Author

skrawcz commented Jul 20, 2023

No worries. Is there a list of supported APIs somewhere?

@rjzamora
Copy link
Member

No worries. Is there a list of supported APIs somewhere?

Good call. Now that people are using dask-expr, we definitely need this kind of documentation (I opened #234 to track this)

@skrawcz
Copy link
Author

skrawcz commented Jul 20, 2023

No worries. Is there a list of supported APIs somewhere?

Good call. Now that people are using dask-expr, we definitely need this kind of documentation (I opened #234 to track this)

Sweet, thanks. It'd be nice if the error experience could discern/guess the situation and point people to that list :)

@phofl
Copy link
Collaborator

phofl commented Jul 21, 2023

Pushed out a new release that contains std and var among other things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants