Skip to content

Include unit argument in timedelta_range type stub #1271

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

Merged
merged 1 commit into from
Jul 10, 2025

Conversation

spencerkclark
Copy link
Contributor

As of pandas 2.0, pd.timedelta_range allows passing a unit argument which controls the underlying precision of the returned timedeltas (link). This PR updates the type stub to reflect this.

  • Tests added: Please use assert_type() to assert the type of any return value

@twoertwein twoertwein merged commit f6dd4a2 into pandas-dev:main Jul 10, 2025
13 checks passed
@twoertwein
Copy link
Member

Thank you @spencerkclark!

@spencerkclark spencerkclark deleted the timedelta_range-unit branch July 10, 2025 13:04
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.

2 participants