Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
delegate (most) datetimelike Series arithmetic ops to DatetimeIndex #18817
DatetimeIndex arithmetic ops do overflow checks that Series does not. Instead of re-implementing those checks (which I tried and its a PITA) this PR just delegates the appropriate operations to the DatetimeIndex implementation.
There are a couple of things that are missing from the DatetimeIndex implementations, e.g. the int-array case added to indexes.datetimelike. If there's consensus that having a single implementation for these ops is the way to go, I'll port the other cases over in their own PRs.
If/when these implementations get merged, ops._TimeOp can be trimmed/removed.
@@ Coverage Diff @@ ## master #18817 +/- ## ========================================= Coverage ? 91.6% ========================================= Files ? 154 Lines ? 51452 Branches ? 0 ========================================= Hits ? 47135 Misses ? 4317 Partials ? 0
The other arithmetic PRs are a couple steps away from really being ready for this. The only part of this that is separately actionable (and on which I need input) is for where (and I guess if) to fix the mismatched behavior in
Closing this PR, will (eventually) open another one with reduced scope.