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: concatenate less in pandas-like with_columns #1361

Closed

Conversation

MarcoGorelli
Copy link
Member

@MarcoGorelli MarcoGorelli commented Nov 13, 2024

It was mentioned here that they're seeing fragmentation warnings from pandas

I think we can address this by only concatenating less in with_columns

What type of PR is this? (check all applicable)

  • 💾 Refactor
  • ✨ Feature
  • 🐛 Bug Fix
  • 🔧 Optimization
  • 📝 Documentation
  • ✅ Test
  • 🐳 Other

Related issues

  • Related issue #
  • Closes #

Checklist

  • Code follows style guide (ruff)
  • Tests added
  • Documented the changes

If you have comments or can explain your changes, please do so below.

@MarcoGorelli MarcoGorelli changed the title perf: With columns refactor perf: concatenate less in pandas-like with_columns Nov 13, 2024
@MarcoGorelli MarcoGorelli marked this pull request as ready for review November 13, 2024 09:19
@MarcoGorelli
Copy link
Member Author

🤔
trying this out here https://www.kaggle.com/code/marcogorelli/visualise-timings?scriptVersionId=207037156 it looks like it doesn't help, and maybe even hurts?

i think we need to dig deeper before merging

@MarcoGorelli
Copy link
Member Author

looks like the warning is actually coming from

            for s in new_columns:
                df[s.name] = validate_dataframe_comparand(index, s)

I think we can address that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant