Skip to content
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

TYP: read_csv's usecols #55330

Merged
merged 4 commits into from
Oct 4, 2023
Merged

TYP: read_csv's usecols #55330

merged 4 commits into from
Oct 4, 2023

Conversation

twoertwein
Copy link
Member

@twoertwein twoertwein commented Sep 30, 2023

This makes read_csv's usecols compatible with the tests from pandas-stubs.

The documentation does mention only list, Callable, and None! This notably excludes range, tuple, and ndarray. I'm happy to tighten the types to the documented types or adjust the documentation.

edit: The pandas tests cover list, tuple, set, nd.array and probably more -> I adjusted the documentation

pandas/_typing.py Outdated Show resolved Hide resolved
@mroeschke mroeschke added the Typing type annotations, mypy/pyright type checking label Oct 2, 2023
@twoertwein twoertwein marked this pull request as ready for review October 3, 2023 02:14
@twoertwein twoertwein requested a review from Dr-Irv as a code owner October 3, 2023 02:14
Copy link
Contributor

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

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

thanks @twoertwein . There are still slight differences between pandas-stubs and pandas here. Do you want to create an issue or PR for the stubs to align things?

@Dr-Irv Dr-Irv merged commit da01e38 into pandas-dev:main Oct 4, 2023
31 of 33 checks passed
@twoertwein twoertwein deleted the type branch December 10, 2023 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants