xinrong-databricks commented on code in PR #36452:
URL: https://github.com/apache/spark/pull/36452#discussion_r867029180
##########
python/pyspark/pandas/groupby.py:
##########
@@ -2673,7 +2682,7 @@ def get_group(self, name: Union[Name, List[Name]]) ->
FrameLike:
return self._cleanup_and_return(DataFrame(internal))
- def median(self, numeric_only: bool = True, accuracy: int = 10000) ->
FrameLike:
+ def median(self, numeric_only: Optional[bool] = True, accuracy: int =
10000) -> FrameLike:
Review Comment:
- DataFrameGroupBy
`numeric_only=True/False/None` -converts to-> `numeric_only=True`
In pandas, when numeric_only is False/None, a FutureWarning will be raised,
and then numeric_only is converted to True.
**So I think setting True as the default value in pandas-on-Spark for
numeric_only makes sense in this case**.
- SeriesGroupBy
`numeric_only=None` -converts to-> `numeric_only=False`
**So setting False as the default value in pandas-on-Spark for numeric_only
seems fine**.
How do you think about that? @HyukjinKwon @Yikun
--
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]