dchvn commented on a change in pull request #34235:
URL: https://github.com/apache/spark/pull/34235#discussion_r727802685
##########
File path: python/pyspark/pandas/series.py
##########
@@ -5014,11 +4998,11 @@ def dot(self, other: Union["Series", DataFrame]) ->
Union[Scalar, "Series"]:
y -14
dtype: int64
"""
- if isinstance(other, DataFrame):
- if not same_anchor(self, other):
- if not
self.index.sort_values().equals(other.index.sort_values()):
- raise ValueError("matrices are not aligned")
+ if not same_anchor(self, other):
+ if not self.index.sort_values().equals(other.index.sort_values()):
Review comment:
I would like to add another parameter like ```check_index```
``` python
def dot(self, other: Union["Series", DataFrame], check_index: bool = True)
-> Union[Scalar, "Series"]:
```
```True```: behave like pandas
```False```: ignore mismatches with NaN
What do you think ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]