ENH: add __rshift__
, __lshift__
, __irshift__
and __ilshift__
#60693
Labels
__rshift__
, __lshift__
, __irshift__
and __ilshift__
#60693
Feature Type
Adding new functionality to pandas
Changing existing functionality in pandas
Removing existing functionality in pandas
Problem Description
Pandas has many in-place operators implemented:
As for
__rshift__
,__lshift__
,__irshift__
and__ilshift__
they don't work in version2.2.2
.And
numpy
implements all methods:Feature Description
Allow for
__rshift__
,__lshift__
,__irshift__
and__ilshift__
calls inSeries
andDataFrames
Alternative Solutions
For now, the solution is to create a new
Series
operating over the underlyingnumpy
arrayAdditional Context
It is curious that the last issue that talks about shift operations is from more than 10 years ago (#2337). Indeed it's quite a niche feature and fits more computer scientists rather than data scientists. Anyway, I thought about this feature more for completeness and consistency with python operators rather than usefulness.
The text was updated successfully, but these errors were encountered: