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

PERF: avoid calling DataFrame.dtypes in loop #59573

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

messense
Copy link
Contributor

@messense messense commented Aug 21, 2024

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

DataFrame.dtypes property isn't cheap to compute, this regressed DataFrame.eval performance massively (when upgrading from 2.1.2 to 2.2.2).

@mroeschke mroeschke added the Performance Memory or execution speed performance label Aug 21, 2024
@mroeschke mroeschke added this to the 3.0 milestone Aug 21, 2024
@mroeschke mroeschke merged commit e1a79b2 into pandas-dev:main Aug 21, 2024
51 checks passed
@mroeschke
Copy link
Member

Thanks @messense

@messense messense deleted the patch-1 branch August 22, 2024 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants