Skip to content

Conversation

@zacharym-collins
Copy link
Contributor

Description

Updates the docstring for the duplicates parameter in pandas.cut (located in pandas/core/reshape/tile.py) to match the function signature and Numpydoc formatting standards.

The parameter was previously documented as {default 'raise', 'drop'}, optional, which incorrectly implied the default might be None or was ambiguous. It has been corrected to {'raise', 'drop'}, default 'raise'.

Validation

Ran the docstring validation script locally, which passed for the updated parameter:
python scripts/validate_docstrings.py pandas.cut

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@jorisvandenbossche jorisvandenbossche changed the title DOC: Fix duplicates parameter docstring in pandas.cut. Closes #63377 DOC: Fix duplicates parameter docstring in pandas.cut Dec 16, 2025
@jorisvandenbossche jorisvandenbossche merged commit c16f459 into pandas-dev:main Dec 16, 2025
46 checks passed
@zacharym-collins zacharym-collins deleted the doc-fix-cut-duplicates branch December 16, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DOC: the default value of duplicates in cut should be "raise"

2 participants