Skip to content

Commit

Permalink
[SPARK-40440][PS][DOCS] Fix wrong reference and content in PS windows…
Browse files Browse the repository at this point in the history
… related doc

### What changes were proposed in this pull request?
Fix wrong reference and content in PS windows related doc:
- Add  `pyspark.pandas.` for window function doc
- Change `pandas_on_spark.DataFrame` to `pyspark.pandas.DataFrame` to make sure link generate correctly.
- Fix `Returns` and `See Also` for `Rolling.count`
- Add ewm doc for `Dataframe` and `series`

### Why are the changes needed?

### Does this PR introduce _any_ user-facing change?

### How was this patch tested?
```
cd ~/spark/python/docs
make html
```
![image](https://user-images.githubusercontent.com/1736354/190328623-4c3250af-3968-430e-adf3-890d1bda850e.png)

![image](https://user-images.githubusercontent.com/1736354/190346064-b359e217-dac0-41df-8033-8477bc94b09b.png)

![image](https://user-images.githubusercontent.com/1736354/190346138-10bfc3ad-0a37-4bdb-b4aa-cc1ee2a3b018.png)

Closes apache#37895 from Yikun/add-doc.

Authored-by: Yikun Jiang <[email protected]>
Signed-off-by: Ruifeng Zheng <[email protected]>
  • Loading branch information
Yikun authored and zhengruifeng committed Sep 15, 2022
1 parent 6d067d0 commit 3d14b74
Show file tree
Hide file tree
Showing 4 changed files with 160 additions and 151 deletions.
1 change: 1 addition & 0 deletions python/docs/source/reference/pyspark.pandas/frame.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ Computations / Descriptive Stats
DataFrame.count
DataFrame.cov
DataFrame.describe
DataFrame.ewm
DataFrame.kurt
DataFrame.kurtosis
DataFrame.mad
Expand Down
1 change: 1 addition & 0 deletions python/docs/source/reference/pyspark.pandas/series.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ Computations / Descriptive Stats
Series.cumsum
Series.cumprod
Series.describe
Series.ewm
Series.filter
Series.kurt
Series.mad
Expand Down
8 changes: 5 additions & 3 deletions python/docs/source/reference/pyspark.pandas/window.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ Window
======
.. currentmodule:: pyspark.pandas.window

Rolling objects are returned by ``.rolling`` calls: :func:`pandas_on_spark.DataFrame.rolling`, :func:`pandas_on_spark.Series.rolling`, etc.
Expanding objects are returned by ``.expanding`` calls: :func:`pandas_on_spark.DataFrame.expanding`, :func:`pandas_on_spark.Series.expanding`, etc.
ExponentialMoving objects are returned by ``.ewm`` calls: :func:`pandas_on_spark.DataFrame.ewm`, :func:`pandas_on_spark.Series.ewm`, etc.
Rolling objects are returned by ``.rolling`` calls: :func:`pyspark.pandas.DataFrame.rolling`, :func:`pyspark.pandas.Series.rolling`, etc.

Expanding objects are returned by ``.expanding`` calls: :func:`pyspark.pandas.DataFrame.expanding`, :func:`pyspark.pandas.Series.expanding`, etc.

ExponentialMoving objects are returned by ``.ewm`` calls: :func:`pyspark.pandas.DataFrame.ewm`, :func:`pyspark.pandas.Series.ewm`, etc.

Standard moving window functions
--------------------------------
Expand Down
Loading

0 comments on commit 3d14b74

Please sign in to comment.