dgd_contributor created SPARK-36671:
---------------------------------------

             Summary: Support __and__ in num_ops.py
                 Key: SPARK-36671
                 URL: https://issues.apache.org/jira/browse/SPARK-36671
             Project: Spark
          Issue Type: Sub-task
          Components: PySpark
    Affects Versions: 3.3.0
            Reporter: dgd_contributor


{code:python}
>>> pser1 = pd.Series([1, 2, 3])
>>> pser2 = pd.Series([4, 5, 6, 7])
>>> pser1 ^ pser2
0     True
1     True
2     True
3    False
dtype: bool

>>> pser1 = ps.Series([1, 2, 3])
>>> pser2 = ps.Series([4, 5, 6, 7])
>>> pser1 & pser2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/dgd/spark/python/pyspark/pandas/base.py", line 423, in __and__
    return self._dtype_op.__and__(self, other)
  File "/Users/dgd/spark/python/pyspark/pandas/data_type_ops/base.py", line 
317, in __and__
    raise TypeError("Bitwise and can not be applied to %s." % self.pretty_name)
TypeError: Bitwise and can not be applied to integrals.

{code}
 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to