You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2024/08/26 02:06:08 UTC
[PR] [SPARK-49382][PS] Make frame box plot properly render the fliers/outlier [spark]
zhengruifeng opened a new pull request, #47866:
URL: https://github.com/apache/spark/pull/47866
### What changes were proposed in this pull request?
fliers/outlier was ignored in the initial implementation https://github.com/apache/spark/pull/36317
### Why are the changes needed?
feature parity for Pandas and Series box plot
### Does this PR introduce _any_ user-facing change?
```
import pyspark.pandas as ps
df = ps.DataFrame([[5.1, 3.5, 0], [4.9, 3.0, 0], [7.0, 3.2, 1], [6.4, 3.2, 1], [5.9, 3.0, 2], [100, 200, 300]], columns=['length', 'width', 'species'])
df.boxplot()
```
`df.length.plot.box()`

before:
`df.boxplot()`

after:
`df.boxplot()`

### How was this patch tested?
CI and manually check
### Was this patch authored or co-authored using generative AI tooling?
No
--
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
Re: [PR] [SPARK-49382][PS] Make frame box plot properly render the fliers/outliers [spark]
Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on PR #47866:
URL: https://github.com/apache/spark/pull/47866#issuecomment-2309332679
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
Re: [PR] [SPARK-49382][PS] Make frame box plot properly render the fliers/outliers [spark]
Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on code in PR #47866:
URL: https://github.com/apache/spark/pull/47866#discussion_r1730611794
##########
python/pyspark/pandas/plot/core.py:
##########
@@ -437,6 +438,37 @@ def get_fliers(colname, outliers, min_val):
return fliers
+ @staticmethod
+ def get_multicol_fliers(colnames, multicol_outliers, multicol_whiskers):
+ scols = []
+ extract_colnames = []
+ for i, colname in enumerate(colnames):
+ formated_colname = "`{}`".format(colname)
+ outlier_colname = "__{}_outlier".format(colname)
+ min_val = multicol_whiskers[colname]["min"]
Review Comment:
I feel it weird to select the outliers by the distance `|value - lower_whisker|`, which is used in series.boxplot.
It should be something like `|value - median|` or `|value - mean|`, will revisit this later.
--
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
Re: [PR] [SPARK-49382][PS] Make frame box plot properly render the fliers/outliers [spark]
Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng closed pull request #47866: [SPARK-49382][PS] Make frame box plot properly render the fliers/outliers
URL: https://github.com/apache/spark/pull/47866
--
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