Skip to content

Ensure column.fillna signatures are consistent - #14724

Merged
rapids-bot[bot] merged 4 commits into
NVIDIA:branch-24.02from
mroeschke:ref/column/fillna
Jan 10, 2024
Merged

Ensure column.fillna signatures are consistent#14724
rapids-bot[bot] merged 4 commits into
NVIDIA:branch-24.02from
mroeschke:ref/column/fillna

Conversation

@mroeschke

Copy link
Copy Markdown
Contributor

Description

Aligns the definitions of Columns.fillna among all subclasses. dtype looks to only needed in certain instances to cast the fill value so can do that separately. A fill_nan can be avoided with its single usage in a can_cast routine by checking for nan first

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 non-breaking Non-breaking change labels Jan 8, 2024
@mroeschke
mroeschke requested a review from a team as a code owner January 8, 2024 23:24
method: Any = None,
dtype: Optional[Dtype] = None,
) -> CategoricalColumn:
method: Optional[str] = None,

@bdice bdice Jan 9, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just checking -- this is non-public so the API break of dropping dtype is not a "breaking change" right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've been working under that assumption that cudf column objects are not public cc @shwina

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, that should be fine! Just wanted to check in case this interacts with any future changes you were planning for public types.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Gotcha. Yeah the arguments being modified in Column.fillna do not clash with Series/DataFrame.fillna

@mroeschke

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit 6a23775 into NVIDIA:branch-24.02 Jan 10, 2024
@mroeschke
mroeschke deleted the ref/column/fillna branch January 10, 2024 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants