-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Open
Labels
BugPeriodPeriod data typePeriod data typeReshapingConcat, Merge/Join, Stack/Unstack, ExplodeConcat, Merge/Join, Stack/Unstack, ExplodeTestingpandas testing functions or related to the test suitepandas testing functions or related to the test suite
Description
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
Labels
BugPeriodPeriod data typePeriod data typeReshapingConcat, Merge/Join, Stack/Unstack, ExplodeConcat, Merge/Join, Stack/Unstack, ExplodeTestingpandas testing functions or related to the test suitepandas testing functions or related to the test suite