This is an automated email from the ASF dual-hosted git repository. ueshin pushed a commit to branch branch-3.2 in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.2 by this push: new ebf7e61 [SPARK-37678][PYTHON] Fix _cleanup_and_return signature ebf7e61 is described below commit ebf7e61b90814e520e5472b9a6ad12e28f9aade3 Author: zero323 <mszymkiew...@gmail.com> AuthorDate: Mon Dec 20 14:15:02 2021 -0800 [SPARK-37678][PYTHON] Fix _cleanup_and_return signature ### What changes were proposed in this pull request? This PR fixes return type annotation for `pandas.groupby.SeriesGroupBy._cleanup_and_return`. ### Why are the changes needed? Current annotation is incorrect (mixes pandas an pyspark.pandas types). ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing tests. Closes #34950 from zero323/SPARK-37678. Authored-by: zero323 <mszymkiew...@gmail.com> Signed-off-by: Takuya UESHIN <ues...@databricks.com> (cherry picked from commit 012939077627e4f35d9585c5a46281776b770190) Signed-off-by: Takuya UESHIN <ues...@databricks.com> --- python/pyspark/pandas/groupby.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/pyspark/pandas/groupby.py b/python/pyspark/pandas/groupby.py index 2c73e32..2d27b129 100644 --- a/python/pyspark/pandas/groupby.py +++ b/python/pyspark/pandas/groupby.py @@ -2967,8 +2967,8 @@ class SeriesGroupBy(GroupBy[Series]): else: return psser.copy() - def _cleanup_and_return(self, pdf: pd.DataFrame) -> Series: - return first_series(pdf).rename().rename(self._psser.name) + def _cleanup_and_return(self, psdf: DataFrame) -> Series: + return first_series(psdf).rename().rename(self._psser.name) def agg(self, *args: Any, **kwargs: Any) -> None: return MissingPandasLikeSeriesGroupBy.agg(self, *args, **kwargs) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org