You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Gurpreet Singh (Jira)" <ji...@apache.org> on 2023/09/17 21:31:00 UTC
[jira] [Commented] (SPARK-44033) Support list-like for binary ops
[ https://issues.apache.org/jira/browse/SPARK-44033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17766159#comment-17766159 ]
Gurpreet Singh commented on SPARK-44033:
----------------------------------------
Hi [~itholic],
Apologies for the delay on this. But I just pushed a draft PR with some changes. Would you be able to take a look and provide any feedback? Thanks
Link to the PR: https://github.com/apache/spark/pull/42962
> Support list-like for binary ops
> --------------------------------
>
> Key: SPARK-44033
> URL: https://issues.apache.org/jira/browse/SPARK-44033
> Project: Spark
> Issue Type: Bug
> Components: Pandas API on Spark
> Affects Versions: 3.5.0
> Reporter: Haejoon Lee
> Priority: Major
> Labels: pull-request-available
>
> We should fix the error below:
> {code:java}
> >>> pser = pd.Series([1, 2, 3, 4, 5, 6], name="x")
> >>> psser = ps.from_pandas(pser)
> >>> other = [np.nan, 1, 3, 4, np.nan, 6]
> >>> psser <= other
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/Users/haejoon.lee/Desktop/git_store/spark/python/pyspark/pandas/base.py", line 412, in __le__
> return self._dtype_op.le(self, other)
> File "/Users/haejoon.lee/Desktop/git_store/spark/python/pyspark/pandas/data_type_ops/num_ops.py", line 242, in le
> _sanitize_list_like(right)
> File "/Users/haejoon.lee/Desktop/git_store/spark/python/pyspark/pandas/data_type_ops/base.py", line 199, in _sanitize_list_like
> raise TypeError("The operation can not be applied to %s." % type(operand).__name__)
> TypeError: The operation can not be applied to list.{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org