zero323 commented on a change in pull request #35150:
URL: https://github.com/apache/spark/pull/35150#discussion_r781019892
##########
File path: python/pyspark/pandas/groupby.py
##########
@@ -2356,12 +2356,16 @@ def nunique(self, dropna: bool = True) -> FrameLike:
Name: value1, dtype: int64
"""
if dropna:
- stat_function = lambda col: F.countDistinct(col)
+
+ def stat_function(col: Column) -> Column:
+ return F.countDistinct(col)
Review comment:
`stat_function = F.countDistinct` should work as well, but I don't have
preference here.
--
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]