itholic commented on code in PR #37897:
URL: https://github.com/apache/spark/pull/37897#discussion_r972518208


##########
python/pyspark/pandas/resample.py:
##########
@@ -481,20 +489,5 @@ def __getattr__(self, item: str) -> Any:
             else:
                 return partial(property_or_func, self)
 
-    def min(self) -> Series:
-        return first_series(self._downsample("min"))
-
-    def max(self) -> Series:
-        return first_series(self._downsample("max"))
-
-    def sum(self) -> Series:
-        return first_series(self._downsample("sum").fillna(0.0))
-
-    def mean(self) -> Series:
-        return first_series(self._downsample("mean"))
-
-    def std(self) -> Series:
-        return first_series(self._downsample("std"))
-
-    def var(self) -> Series:
-        return first_series(self._downsample("var"))
+    def _cleanup_and_return(self, psdf: DataFrame) -> Series:
+        return first_series(psdf).rename().rename(self._psser.name)

Review Comment:
   qq: Why we do rename twice 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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to