Commit 23e5cfc
committed
Use ._tshift internally for datetimelike ops
In preperation for PeriodArray / DatetimeArray / TimedeltaArray.
Index.shift has a different meaning from ExtensionArray.shift.
- Index.shift pointwise shifts each element by some amount
- ExtensionArray.shift shits the *position* of each value in the array
padding the end with NA
This is going to get confusing. This PR tries to avoid some of that by
internally using a new `_tshift` method (time-shift) when we want to do pointwise
shifting of each value. Places that know they want that behavior (like in the
datetimelike ops) should use that.1 parent 1d9f76c commit 23e5cfc
2 files changed
+26
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
458 | | - | |
| 458 | + | |
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
| |||
553 | 553 | | |
554 | 554 | | |
555 | 555 | | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
556 | 573 | | |
557 | 574 | | |
558 | 575 | | |
| |||
600 | 617 | | |
601 | 618 | | |
602 | 619 | | |
603 | | - | |
| 620 | + | |
604 | 621 | | |
605 | 622 | | |
606 | 623 | | |
| |||
652 | 669 | | |
653 | 670 | | |
654 | 671 | | |
655 | | - | |
| 672 | + | |
656 | 673 | | |
657 | 674 | | |
658 | 675 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | | - | |
| 320 | + | |
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
335 | 338 | | |
336 | 339 | | |
337 | 340 | | |
| |||
0 commit comments