Skip to content

[SPARK-47997][PS] Add errors parameter to DataFrame.drop and Series.drop#54659

Open
devin-petersohn wants to merge 1 commit intoapache:masterfrom
devin-petersohn:devin/add-drop-errors-param
Open

[SPARK-47997][PS] Add errors parameter to DataFrame.drop and Series.drop#54659
devin-petersohn wants to merge 1 commit intoapache:masterfrom
devin-petersohn:devin/add-drop-errors-param

Conversation

@devin-petersohn
Copy link
Contributor

What changes were proposed in this pull request?

Add the errors parameter to DataFrame.drop and Series.drop to match pandas API. When errors='raise' (default), a KeyError is raised if any requested label is not found. When errors='ignore', missing labels are silently skipped.

Why are the changes needed?

pandas API parity. Users migrating from pandas expect the errors parameter to be available.

Does this PR introduce any user-facing change?

Yes, new errors parameter on DataFrame.drop and Series.drop.

How was this patch tested?

CI

Was this patch authored or co-authored using generative AI tooling?

Co-authored-by: Claude Opus 4

Co-authored-by: Devin Petersohn <devin.petersohn@snowflake.com>
Signed-off-by: Devin Petersohn <devin.petersohn@gmail.com>
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 this pull request may close these issues.

1 participant