You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2022/04/04 06:16:00 UTC
[spark] branch master updated: [MINOR][DOCS] Remove PySpark doc build warnings
This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new a252c109b32 [MINOR][DOCS] Remove PySpark doc build warnings
a252c109b32 is described below
commit a252c109b32bd3bbb269d6790f0c35e0a4ae705f
Author: Hyukjin Kwon <gu...@apache.org>
AuthorDate: Mon Apr 4 15:15:39 2022 +0900
[MINOR][DOCS] Remove PySpark doc build warnings
### What changes were proposed in this pull request?
This PR fixes a various documentation build warnings in PySpark documentation
### Why are the changes needed?
To render the docs better.
### Does this PR introduce _any_ user-facing change?
Yes, it changes the documentation to be prettier. Pretty minor though.
### How was this patch tested?
I manually tested it by building the PySpark documentation
Closes #36057 from HyukjinKwon/remove-pyspark-build-warnings.
Authored-by: Hyukjin Kwon <gu...@apache.org>
Signed-off-by: Hyukjin Kwon <gu...@apache.org>
---
python/docs/source/user_guide/sql/arrow_pandas.rst | 18 +++++++++---------
python/pyspark/pandas/generic.py | 4 ++--
python/pyspark/pandas/indexes/base.py | 2 +-
python/pyspark/pandas/series.py | 6 ++----
python/pyspark/sql/streaming/readwriter.py | 2 +-
5 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/python/docs/source/user_guide/sql/arrow_pandas.rst b/python/docs/source/user_guide/sql/arrow_pandas.rst
index 20a9f935d58..9675b1096f0 100644
--- a/python/docs/source/user_guide/sql/arrow_pandas.rst
+++ b/python/docs/source/user_guide/sql/arrow_pandas.rst
@@ -53,7 +53,7 @@ This can be controlled by ``spark.sql.execution.arrow.pyspark.fallback.enabled``
.. literalinclude:: ../../../../../examples/src/main/python/sql/arrow.py
:language: python
- :lines: 35-48
+ :lines: 37-52
:dedent: 4
Using the above optimizations with Arrow will produce the same results as when Arrow is not
@@ -90,7 +90,7 @@ specify the type hints of ``pandas.Series`` and ``pandas.DataFrame`` as below:
.. literalinclude:: ../../../../../examples/src/main/python/sql/arrow.py
:language: python
- :lines: 54-78
+ :lines: 56-80
:dedent: 4
In the following sections, it describes the combinations of the supported type hints. For simplicity,
@@ -113,7 +113,7 @@ The following example shows how to create this Pandas UDF that computes the prod
.. literalinclude:: ../../../../../examples/src/main/python/sql/arrow.py
:language: python
- :lines: 82-112
+ :lines: 84-114
:dedent: 4
For detailed usage, please see :func:`pandas_udf`.
@@ -152,7 +152,7 @@ The following example shows how to create this Pandas UDF:
.. literalinclude:: ../../../../../examples/src/main/python/sql/arrow.py
:language: python
- :lines: 116-138
+ :lines: 118-140
:dedent: 4
For detailed usage, please see :func:`pandas_udf`.
@@ -174,7 +174,7 @@ The following example shows how to create this Pandas UDF:
.. literalinclude:: ../../../../../examples/src/main/python/sql/arrow.py
:language: python
- :lines: 142-165
+ :lines: 144-167
:dedent: 4
For detailed usage, please see :func:`pandas_udf`.
@@ -205,7 +205,7 @@ and window operations:
.. literalinclude:: ../../../../../examples/src/main/python/sql/arrow.py
:language: python
- :lines: 169-210
+ :lines: 171-212
:dedent: 4
.. currentmodule:: pyspark.sql.functions
@@ -270,7 +270,7 @@ in the group.
.. literalinclude:: ../../../../../examples/src/main/python/sql/arrow.py
:language: python
- :lines: 214-232
+ :lines: 216-234
:dedent: 4
For detailed usage, please see please see :meth:`GroupedData.applyInPandas`
@@ -288,7 +288,7 @@ The following example shows how to use :meth:`DataFrame.mapInPandas`:
.. literalinclude:: ../../../../../examples/src/main/python/sql/arrow.py
:language: python
- :lines: 236-247
+ :lines: 238-249
:dedent: 4
For detailed usage, please see :meth:`DataFrame.mapInPandas`.
@@ -327,7 +327,7 @@ The following example shows how to use ``DataFrame.groupby().cogroup().applyInPa
.. literalinclude:: ../../../../../examples/src/main/python/sql/arrow.py
:language: python
- :lines: 251-273
+ :lines: 253-275
:dedent: 4
diff --git a/python/pyspark/pandas/generic.py b/python/pyspark/pandas/generic.py
index 49375da5166..77501268684 100644
--- a/python/pyspark/pandas/generic.py
+++ b/python/pyspark/pandas/generic.py
@@ -952,7 +952,7 @@ class Frame(object, metaclass=ABCMeta):
This parameter only works when `path` is specified.
Returns
- --------
+ -------
str or None
Examples
@@ -2317,7 +2317,7 @@ class Frame(object, metaclass=ABCMeta):
the object does not have exactly 1 element, or that element is not boolean
Returns
- --------
+ -------
bool
Examples
diff --git a/python/pyspark/pandas/indexes/base.py b/python/pyspark/pandas/indexes/base.py
index b956e78beb6..450a083a983 100644
--- a/python/pyspark/pandas/indexes/base.py
+++ b/python/pyspark/pandas/indexes/base.py
@@ -1313,7 +1313,7 @@ class Index(IndexOpsMixin):
"""
Return Index if a valid level is given.
- Examples:
+ Examples
--------
>>> psidx = ps.Index(['a', 'b', 'c'], name='ks')
>>> psidx.get_level_values(0)
diff --git a/python/pyspark/pandas/series.py b/python/pyspark/pandas/series.py
index e33fe5c84b3..5c6fe3b78a3 100644
--- a/python/pyspark/pandas/series.py
+++ b/python/pyspark/pandas/series.py
@@ -1704,10 +1704,8 @@ class Series(Frame, IndexOpsMixin, Generic[T]):
----------
keep : {'first', 'last', False}, default 'first'
Method to handle marking duplicates:
- - 'first' : Mark duplicates as ``True`` except for the first
- occurrence.
- - 'last' : Mark duplicates as ``True`` except for the last
- occurrence.
+ - 'first' : Mark duplicates as ``True`` except for the first occurrence.
+ - 'last' : Mark duplicates as ``True`` except for the last occurrence.
- ``False`` : Mark all duplicates as ``True``.
Returns
diff --git a/python/pyspark/sql/streaming/readwriter.py b/python/pyspark/sql/streaming/readwriter.py
index e87b6008367..74b89dbe46c 100644
--- a/python/pyspark/sql/streaming/readwriter.py
+++ b/python/pyspark/sql/streaming/readwriter.py
@@ -555,7 +555,7 @@ class DataStreamReader(OptionUtils):
string, for the name of the table.
Returns
- --------
+ -------
:class:`DataFrame`
Notes
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org