-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Handle ExtensionArrays in Series.unstack / DataFrame.stack #23077
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
Comments
I'm working on this now. |
I have a WIP for We can write
It seems to work... but it's quite slow. If you're reshaping to We should be able to improve the (maybe common?) case of a "uniform" index (like what you get from |
@TomAugspurger is it slower compared to the current implementation for non-consolidatable blocks? Or how does it currently work for them? |
DataFrame.stack() has a regression from 0.23.4
previously that returned an object-dtype Series. Ideally, it would be a categorical. |
@jorisvandenbossche I have a new implementation that lowers the overhead for EAs. Will post the timings in the PR (once I've written them). It'll basically be identical to previously, but
|
Here's a test for
Series.unstack
We don't do so well right now. Just categorical passes.
No test for DataFrame.stack. In https://github.com/pandas-dev/pandas/pull/22862/files there's a WIP for stack that's based around
ExtensionArray._concat_same_type
instead of.reshape
The text was updated successfully, but these errors were encountered: