You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "xinrong-meng (via GitHub)" <gi...@apache.org> on 2024/10/14 03:37:50 UTC
[PR] [SPARK-49948][PS][CONNECT] Add parameter "precision" to pandas on Spark box plot [spark]
xinrong-meng opened a new pull request, #48445:
URL: https://github.com/apache/spark/pull/48445
### What changes were proposed in this pull request?
Add parameter "precision" to pandas on Spark box plot.
### Why are the changes needed?
Previously, the box method used **kwds, allowing precision to be passed implicitly. Now, adding precision directly to the signature ensures clarity and explicit control, improving usability.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Existing tests.
### 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-49948][PS][CONNECT] Add parameter "precision" to pandas on Spark box plot [spark]
Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on code in PR #48445:
URL: https://github.com/apache/spark/pull/48445#discussion_r1798722205
##########
python/pyspark/pandas/plot/core.py:
##########
@@ -857,14 +857,13 @@ def box(self, **kwds):
Parameters
----------
- **kwds : optional
- Additional keyword arguments are documented in
- :meth:`pyspark.pandas.Series.plot`.
-
precision: scalar, default = 0.01
This argument is used by pandas-on-Spark to compute approximate statistics
for building a boxplot. Use *smaller* values to get more precise
- statistics (matplotlib-only).
+ statistics (matplotlib-only).cccccbdvtdlhreffhieutnkglfeibhferhfctieuiiln
Review Comment:
what is this?
--
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-49948][PS][CONNECT] Add parameter "precision" to pandas on Spark box plot [spark]
Posted by "xinrong-meng (via GitHub)" <gi...@apache.org>.
xinrong-meng closed pull request #48445: [SPARK-49948][PS][CONNECT] Add parameter "precision" to pandas on Spark box plot
URL: https://github.com/apache/spark/pull/48445
--
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-49948][PS][CONNECT] Add parameter "precision" to pandas on Spark box plot [spark]
Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on code in PR #48445:
URL: https://github.com/apache/spark/pull/48445#discussion_r1804042377
##########
python/pyspark/pandas/plot/core.py:
##########
@@ -841,7 +841,7 @@ def barh(self, x=None, y=None, **kwargs):
elif isinstance(self.data, DataFrame):
return self(kind="barh", x=x, y=y, **kwargs)
- def box(self, **kwds):
+ def box(self, precision=0.01, **kwds):
Review Comment:
on second thought, I think we'd better still hide `precision` in `**kwds`, because it is a spark-sepcific implementation details.
we can document it in under the `**kwds` docstring.
--
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-49948][PS][CONNECT] Add parameter "precision" to pandas on Spark box plot [spark]
Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on code in PR #48445:
URL: https://github.com/apache/spark/pull/48445#discussion_r1798722779
##########
python/pyspark/pandas/plot/core.py:
##########
@@ -857,14 +857,13 @@ def box(self, **kwds):
Parameters
----------
- **kwds : optional
- Additional keyword arguments are documented in
- :meth:`pyspark.pandas.Series.plot`.
-
precision: scalar, default = 0.01
This argument is used by pandas-on-Spark to compute approximate statistics
for building a boxplot. Use *smaller* values to get more precise
- statistics (matplotlib-only).
+ statistics (matplotlib-only).cccccbdvtdlhreffhieutnkglfeibhferhfctieuiiln
Review Comment:
> matplotlib-only
after this change, will it also take effect in plotly?
##########
python/pyspark/pandas/plot/core.py:
##########
@@ -857,14 +857,13 @@ def box(self, **kwds):
Parameters
----------
- **kwds : optional
- Additional keyword arguments are documented in
- :meth:`pyspark.pandas.Series.plot`.
-
precision: scalar, default = 0.01
This argument is used by pandas-on-Spark to compute approximate statistics
for building a boxplot. Use *smaller* values to get more precise
- statistics (matplotlib-only).
+ statistics (matplotlib-only).cccccbdvtdlhreffhieutnkglfeibhferhfctieuiiln
Review Comment:
> matplotlib-only
after this change, will it also take effect in plotly?
--
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-49948][PS][CONNECT] Add parameter "precision" to pandas on Spark box plot [spark]
Posted by "xinrong-meng (via GitHub)" <gi...@apache.org>.
xinrong-meng commented on code in PR #48445:
URL: https://github.com/apache/spark/pull/48445#discussion_r1798761014
##########
python/pyspark/pandas/plot/core.py:
##########
@@ -857,14 +857,13 @@ def box(self, **kwds):
Parameters
----------
- **kwds : optional
- Additional keyword arguments are documented in
- :meth:`pyspark.pandas.Series.plot`.
-
precision: scalar, default = 0.01
This argument is used by pandas-on-Spark to compute approximate statistics
for building a boxplot. Use *smaller* values to get more precise
- statistics (matplotlib-only).
+ statistics (matplotlib-only).cccccbdvtdlhreffhieutnkglfeibhferhfctieuiiln
Review Comment:
I wasn’t sure why we added “matplotlib-only” in the first place, because it works with Plotly as shown [here](https://github.com/apache/spark/blob/master/python/pyspark/pandas/plot/plotly.py#L166).
Removed.
--
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-49948][PS][CONNECT] Add parameter "precision" to pandas on Spark box plot [spark]
Posted by "xinrong-meng (via GitHub)" <gi...@apache.org>.
xinrong-meng commented on code in PR #48445:
URL: https://github.com/apache/spark/pull/48445#discussion_r1804151384
##########
python/pyspark/pandas/plot/core.py:
##########
@@ -841,7 +841,7 @@ def barh(self, x=None, y=None, **kwargs):
elif isinstance(self.data, DataFrame):
return self(kind="barh", x=x, y=y, **kwargs)
- def box(self, **kwds):
+ def box(self, precision=0.01, **kwds):
Review Comment:
That makes sense! Created https://issues.apache.org/jira/browse/SPARK-50001 for that.
--
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-49948][PS][CONNECT] Add parameter "precision" to pandas on Spark box plot [spark]
Posted by "xinrong-meng (via GitHub)" <gi...@apache.org>.
xinrong-meng commented on PR #48445:
URL: https://github.com/apache/spark/pull/48445#issuecomment-2415411888
Merged to master, thank you!
--
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