Skip to content

BUG/TST: can_use_libjoin cases with mixed-freq Periods #55333

Open
@jbrockmendel

Description

@jbrockmendel

In the Index code we have a fastpaths in for _union, _intersection and join, that look something like

if self._can_use_libjoin and [...]
     try:
        result = self._use_fastpath(...)
     except TypeError:
         # object dtype, non-comparable objects
         result = self._non_fastpath(...)

_union also catches IncompatibleFrequency (which subclasses ValueError instead of TypeError, which itself might be something to somehow deprecate) which is what you get if you try to sort Period objects with mismatched freqs.

I'm guessing that the _intersection and join paths should also catch IncompatibleFrequency. Either that or check that we have test cases that get there with mismatches Periods inside object dtype indexes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPeriodPeriod data typeReshapingConcat, Merge/Join, Stack/Unstack, ExplodeTestingpandas testing functions or related to the test suite

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions