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

BUG: pivot_table with EA dtype that cannot hold NA #55484

Open
jbrockmendel opened this issue Oct 11, 2023 · 0 comments
Open

BUG: pivot_table with EA dtype that cannot hold NA #55484

jbrockmendel opened this issue Oct 11, 2023 · 0 comments
Labels
Bug NA - MaskedArrays Related to pd.NA and nullable extension arrays Reshaping Concat, Merge/Join, Stack/Unstack, Explode

Comments

@jbrockmendel
Copy link
Member

jbrockmendel commented Oct 11, 2023

Speculative: in _add_margins there is a snippet

        if isinstance(dtype, ExtensionDtype):
            # Can hold NA already
            continue

This seems to assume that the dtype will have dtype._can_hold_na, but that is not actually required of ExtensionDtypes. The task here is to implement a test case that gets here with an ExtensionDtype that cannot hold na, make sure it doesn't break things.

@jbrockmendel jbrockmendel added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Oct 11, 2023
@lithomas1 lithomas1 added Reshaping Concat, Merge/Join, Stack/Unstack, Explode NA - MaskedArrays Related to pd.NA and nullable extension arrays and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug NA - MaskedArrays Related to pd.NA and nullable extension arrays Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

No branches or pull requests

2 participants