Skip to content

Conversation

@zacharym-collins
Copy link
Contributor

@zacharym-collins zacharym-collins commented Dec 16, 2025

Description

Updates the docstring for the name parameter in pandas.bdate_range (located in pandas/core/indexes/datetimes.py).

EDIT: Also updates the docstring for the name parameter for date_range and timedelta_range.

The type was previously documented as str, but the implementation supports any Hashable object (consistent with other index constructors). Updated to name : Hashable, default None.

Validation

Ran the docstring validation script locally:
python scripts/validate_docstrings.py pandas.bdate_range

@jorisvandenbossche
Copy link
Member

Looks good! Could you make the same change for date_range and timedelta_range as well?

@zacharym-collins
Copy link
Contributor Author

Yes, will do, give me a few moments.

@zacharym-collins
Copy link
Contributor Author

I've updated date_range and timedelta_range to use Hashable for the name parameter as requested. Ready for review.

@mroeschke mroeschke added the Docs label Dec 16, 2025
@mroeschke mroeschke added this to the 3.0 milestone Dec 16, 2025
@mroeschke mroeschke merged commit 73d1165 into pandas-dev:main Dec 16, 2025
46 checks passed
@mroeschke
Copy link
Member

Thanks @zacharym-collins

@zacharym-collins zacharym-collins deleted the doc-fix-bdate-name branch December 17, 2025 11:34
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 type of name in bdate_range should be Hashable

3 participants