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 2021/10/13 01:19:46 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #34251: [SPARK-36973][PYTHON] Deduplicate prepare data method for HistogramPlotBase and KdePlotBase

HyukjinKwon commented on a change in pull request #34251:
URL: https://github.com/apache/spark/pull/34251#discussion_r727626053



##########
File path: python/pyspark/pandas/plot/core.py
##########
@@ -98,25 +98,29 @@ def set_result_text(self, ax):
             )
 
 
-class HistogramPlotBase:
-    @staticmethod
-    def prepare_hist_data(data, bins):
-        # TODO: this logic is similar with KdePlotBase. Might have to deduplicate it.
-        from pyspark.pandas.series import Series
+def _prepare_numeric_data(data):

Review comment:
       Can we create a class called `NumericPlotBase` and define this method, and let `HistogramPlotBase` and `KdePlotBase` inherit it?




-- 
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