We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
cudf.DataFrame.mean
Suppose I have a cudf DataFrame as follows:
df = cudf.DataFrame({('a', 1): [1, 2], ('a', 2): [3, 4]})
This creates a MultiIndex dataframe:
a 1 2 0 1 3 1 2 4
I want to compute column-wise mean like:
df.mean()
This should produce (as in pandas):
a 1 1.5 2 3.5 dtype: float64
However, right now it shows an error,
ValueError: Data must be 1-dimensional
Right now, I can make it work by doing the computation in cupy and explicitly creating a Series object:
cudf.Series(df.to_cupy().mean(axis=0), index=df.columns)
but I wish it was native in cudf.
The text was updated successfully, but these errors were encountered:
Fix reductions when DataFrame has MulitIndex columns (#15097)
4ce99af
closes #15085 Authors: - Matthew Roeschke (https://github.com/mroeschke) Approvers: - GALI PREM SAGAR (https://github.com/galipremsagar) - Bradley Dice (https://github.com/bdice) URL: #15097
mroeschke
Successfully merging a pull request may close this issue.
Suppose I have a cudf DataFrame as follows:
This creates a MultiIndex dataframe:
I want to compute column-wise mean like:
This should produce (as in pandas):
However, right now it shows an error,
Right now, I can make it work by doing the computation in cupy and explicitly creating a Series object:
but I wish it was native in cudf.
The text was updated successfully, but these errors were encountered: