Skip to content

Add types for pandas.DataFrame.map #801

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 4 commits into from
Oct 24, 2023
Merged

Add types for pandas.DataFrame.map #801

merged 4 commits into from
Oct 24, 2023

Conversation

andrewpmk
Copy link
Contributor

@andrewpmk andrewpmk commented Oct 20, 2023

Added types for pandas.DataFrame.map (renamed from applymap in pandas 2.1.0 and later https://pandas.pydata.org/docs/dev/reference/api/pandas.DataFrame.map.html, applymap has been deprecated)

Copy link
Collaborator

@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 for the PR. Just some straightforward changes to meet our current practices.

I may not be able to approve/merge until Tuesday, 10/24

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Oct 20, 2023

precommit is failing because you didn't format with black

See https://github.com/pandas-dev/pandas-stubs/blob/main/docs/setup.md to set up your environment.

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Oct 20, 2023

Also CI is failing because pyright 1.1.332 is picking up stuff we need to investigate.

Can you put pyright==1.1.331 in the pyproject.toml file?

@twoertwein
Copy link
Member

pyright seems to now enforce more checks for stub files

Behavior Change: Changed override-related checks (reportIncompatibleMethodOverride, reportIncompatibleVariableOverride and reportImplicitOverride) so they apply to stub files. Previously, these were skipped for stubs.

I will try to look into that.

@andrewpmk andrewpmk force-pushed the main branch 2 times, most recently from 6374fed to 911dc2e Compare October 21, 2023 02:13
@andrewpmk
Copy link
Contributor Author

Made some changes:

  • Removed stub and test for applymap
  • Downgraded pyright
  • Ran the precommit (it just removes some whitespace)

- Removed stub and test for applymap
- Downgraded pyright
- Ran the precommit (it just removes some whitespace)
Copy link
Member

@twoertwein twoertwein left a comment

Choose a reason for hiding this comment

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

I think this also closes #774: can you also add "closes #774" to the first comment

Copy link
Collaborator

@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 @andrewpmk

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.

new .map method of pd.DataFrame and mypy
3 participants