Yikun commented on a change in pull request #35706:
URL: https://github.com/apache/spark/pull/35706#discussion_r818303909
##########
File path: python/pyspark/pandas/series.py
##########
@@ -992,8 +993,10 @@ def map(self, arg: Union[Dict, Callable]) -> "Series":
Parameters
----------
- arg : function or dict
+ arg : function, dict, or pd.Series
Review comment:
```suggestion
arg : function, dict or pd.Series
```
##########
File path: python/pyspark/pandas/series.py
##########
@@ -976,9 +976,10 @@ def cov(self, other: "Series", min_periods: Optional[int]
= None) -> float:
else:
return sdf.select(F.covar_samp(*sdf.columns)).head(1)[0][0]
- # TODO: arg should support Series
# TODO: NaN and None
Review comment:
I guess this `TODO` can also be removed
##########
File path: python/pyspark/pandas/series.py
##########
@@ -992,8 +993,10 @@ def map(self, arg: Union[Dict, Callable]) -> "Series":
Parameters
----------
- arg : function or dict
+ arg : function, dict, or pd.Series
Mapping correspondence.
+ na_action :
+ If ‘ignore’, propagate NA values, without passing them to the
mapping correspondence.
Review comment:
```suggestion
If `ignore`, propagate NA values, without passing them to the
mapping correspondence.
```
super nits: Looks it's c-p from pandas, but I think "`" it more better.
--
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]