You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/04/12 08:38:59 UTC

[GitHub] [spark] Yikun opened a new pull request, #36159: [SPARK-38857][PYTHON] series name should be preserved in series.mode()

Yikun opened a new pull request, #36159:
URL: https://github.com/apache/spark/pull/36159

   ### What changes were proposed in this pull request?
   
   series name is preserved in `series.mode`.
   
   ### Why are the changes needed?
   
   series name should be preserved in series.mode() to follow pandas 1.4.x behavior.
   
   
   ### Does this PR introduce _any_ user-facing change?
   Yes, if series set name, it will be preserved in series.mode()
   
   
   ### How was this patch tested?
   
   UT test both in before and after 1.4.x


-- 
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-unsubscribe@spark.apache.org

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


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


[GitHub] [spark] HyukjinKwon commented on a diff in pull request #36159: [SPARK-38857][PYTHON] series name should be preserved in series.mode()

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on code in PR #36159:
URL: https://github.com/apache/spark/pull/36159#discussion_r848229256


##########
python/pyspark/pandas/series.py:
##########
@@ -4400,6 +4400,8 @@ def mode(self, dropna: bool = True) -> "Series":
         Series
             Modes of the Series.
 
+        .. note:: Since Spark 3.4.0, series name is preserved to follow pandas 1.4+ behavior.

Review Comment:
   Let's don't do it for now .. 



-- 
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-unsubscribe@spark.apache.org

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


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


[GitHub] [spark] Yikun commented on a diff in pull request #36159: [SPARK-38857][PYTHON] series name should be preserved in series.mode()

Posted by GitBox <gi...@apache.org>.
Yikun commented on code in PR #36159:
URL: https://github.com/apache/spark/pull/36159#discussion_r848205312


##########
python/pyspark/pandas/series.py:
##########
@@ -4400,6 +4400,8 @@ def mode(self, dropna: bool = True) -> "Series":
         Series
             Modes of the Series.
 
+        .. note:: Since Spark 3.4.0, series name is preserved to follow pandas 1.4+ behavior.

Review Comment:
   Sure, should we also mention these behavior changes in `docs/source/migration_guide/pyspark_3.3_to_3.4.rst`?



-- 
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-unsubscribe@spark.apache.org

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


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


[GitHub] [spark] Yikun commented on pull request #36159: [SPARK-38857][PYTHON] series name should be preserved in series.mode()

Posted by GitBox <gi...@apache.org>.
Yikun commented on PR #36159:
URL: https://github.com/apache/spark/pull/36159#issuecomment-1098621153

   All test passed: https://github.com/Yikun/spark/actions/runs/2158528121


-- 
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-unsubscribe@spark.apache.org

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


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


[GitHub] [spark] HyukjinKwon closed pull request #36159: [SPARK-38857][PYTHON] series name should be preserved in series.mode()

Posted by GitBox <gi...@apache.org>.
HyukjinKwon closed pull request #36159: [SPARK-38857][PYTHON] series name should be preserved in series.mode()
URL: https://github.com/apache/spark/pull/36159


-- 
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-unsubscribe@spark.apache.org

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


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


[GitHub] [spark] HyukjinKwon commented on a diff in pull request #36159: [SPARK-38857][PYTHON] series name should be preserved in series.mode()

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on code in PR #36159:
URL: https://github.com/apache/spark/pull/36159#discussion_r848179244


##########
python/pyspark/pandas/series.py:
##########
@@ -4400,6 +4400,8 @@ def mode(self, dropna: bool = True) -> "Series":
         Series
             Modes of the Series.
 
+        .. note:: Since Spark 3.4.0, series name is preserved to follow pandas 1.4+ behavior.

Review Comment:
   You can use `versionchanged` directive but I don't mind as is since it's already inconsistent.



-- 
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-unsubscribe@spark.apache.org

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


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


[GitHub] [spark] Yikun commented on pull request #36159: [SPARK-38857][PYTHON] series name should be preserved in series.mode()

Posted by GitBox <gi...@apache.org>.
Yikun commented on PR #36159:
URL: https://github.com/apache/spark/pull/36159#issuecomment-1098620190

   The regression test for name preserving has been merged in pandas side: https://github.com/pandas-dev/pandas/commit/0d07c2361b13a24afc7cd2bf91e642474f313195 .
   
   Ready for review.


-- 
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-unsubscribe@spark.apache.org

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


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


[GitHub] [spark] HyukjinKwon commented on pull request #36159: [SPARK-38857][PYTHON] series name should be preserved in series.mode()

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on PR #36159:
URL: https://github.com/apache/spark/pull/36159#issuecomment-1098621829

   Merged to master.


-- 
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-unsubscribe@spark.apache.org

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


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