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

Fix DataFrame reductions with median returning scalar instead of Series #16527

Merged
merged 12 commits into from
Aug 16, 2024

Conversation

mroeschke
Copy link
Contributor

@mroeschke mroeschke commented Aug 9, 2024

Description

xref #16507

This turned into a little bit of a refactor that also fixes the following:

  • cudf.DataFrame.from_pandas not preserving the pandas.DataFrame.column.dtype
  • cudf.DataFrame.<reduction>(axis=0) not preserving the .column properties in the resulting .index

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@mroeschke mroeschke added bug Something isn't working Python Affects Python cuDF API. non-breaking Non-breaking change labels Aug 9, 2024
@mroeschke mroeschke requested a review from a team as a code owner August 9, 2024 23:20
@mroeschke mroeschke requested review from wence- and Matt711 August 9, 2024 23:20
.. pandas-compat::
:meth:`pandas.DataFrame.var`, :meth:`pandas.Series.var`

Parameters currently not supported are `level` and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are level and numeric_only no longer supported?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

level no long exists as a keyword (including pandas)

numeric_only is supported in DataFrame reduction ops

python/cudf/cudf/core/dataframe.py Outdated Show resolved Hide resolved
python/cudf/cudf/core/dataframe.py Outdated Show resolved Hide resolved
python/cudf/cudf/core/dataframe.py Show resolved Hide resolved
python/cudf/cudf/core/dataframe.py Show resolved Hide resolved
@vyasr
Copy link
Contributor

vyasr commented Aug 16, 2024

/merge

@rapids-bot rapids-bot bot merged commit cb843db into rapidsai:branch-24.10 Aug 16, 2024
83 checks passed
@mroeschke mroeschke deleted the bug/reductions branch August 16, 2024 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants