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

Disallow cudf.Series to accept column in favor of ._from_column #16454

Merged
merged 17 commits into from
Aug 7, 2024

Conversation

mroeschke
Copy link
Contributor

Description

cudf.Series is a public constructor that happens to accept a private ColumnBase object. Many ops return Columns and is natural to want to reconstruct a Series.

This PR adds a SingleColumnFrame._from_column classmethod for instances where we need to wrap a new column in an Index or Series. This constructor also passes some unneeded validation in ColumnAccessor and Series

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 Python Affects Python cuDF API. improvement Improvement / enhancement to an existing function breaking Breaking change labels Jul 31, 2024
@mroeschke mroeschke requested a review from a team as a code owner July 31, 2024 21:49
@mroeschke mroeschke requested a review from a team as a code owner August 1, 2024 16:27
@galipremsagar
Copy link
Contributor

/merge

@rapids-bot rapids-bot bot merged commit 6b0bff4 into rapidsai:branch-24.10 Aug 7, 2024
79 checks passed
@mroeschke mroeschke deleted the ref/series/no_column branch August 7, 2024 01:34
rapids-bot bot pushed a commit to rapidsai/cuml that referenced this pull request Aug 9, 2024
closes #6017

With rapidsai/cudf#16454, `cudf.Series` no longer accepts cudf `ColumnBase` objects. The usage of this pattern in cuml was mostly not needed as there existed public APIs to avoid this behavior

Authors:
  - Matthew Roeschke (https://github.com/mroeschke)

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: #6019
rapids-bot bot pushed a commit to rapidsai/cuspatial that referenced this pull request Aug 9, 2024
…#1434)

closes #1433

Mirroring the upstream cudf changes in rapidsai/cudf#16454, `cudf.Series` disallows accepting a `ColumnBase` in favor of the `cudf.Series._from_column` constructor. This PR does the same for `GeoSeries` as well as addresses the breakages due to the upstream cudf change.

Authors:
  - Matthew Roeschke (https://github.com/mroeschke)

Approvers:
  - Mark Harris (https://github.com/harrism)
  - Bradley Dice (https://github.com/bdice)

URL: #1434
rapids-bot bot pushed a commit that referenced this pull request Aug 15, 2024
Similar to #16454, this PR disallows the public `cudf.Index` accepting a private `ColumnBase` object in favor of `_from_column` (which was added in the linked PR)

Authors:
  - Matthew Roeschke (https://github.com/mroeschke)
  - GALI PREM SAGAR (https://github.com/galipremsagar)

Approvers:
  - GALI PREM SAGAR (https://github.com/galipremsagar)

URL: #16549
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking change improvement Improvement / enhancement to an existing function Python Affects Python cuDF API.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants