GitHub user HyukjinKwon opened a pull request:

    https://github.com/apache/spark/pull/16824

    [SPARK-18069][PYTHON] Make PySpark doctests for SQL self-contained

    ## What changes were proposed in this pull request?
    
    This PR proposes to make the examples in Python API documentation as 
self-contained.
    
    These seem pretty common in Python API documentation, for example, 
[pandas](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.pivot.html#pandas.DataFrame.pivot)
 and [numpy](https://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html).
    
    **Before**
    
    <img width="430" alt="2017-02-07 2 51 52" 
src="https://cloud.githubusercontent.com/assets/6477701/22659679/ded31cc0-ece1-11e6-983a-f1f1632beeda.png";>
    
    <img width="621" alt="2017-02-07 2 56 52" 
src="https://cloud.githubusercontent.com/assets/6477701/22659667/d7eda240-ece1-11e6-8082-e79924f69869.png";>
    
    **After**
    
    <img width="634" alt="2017-02-07 2 52 03" 
src="https://cloud.githubusercontent.com/assets/6477701/22659672/db80d56c-ece1-11e6-8679-50484d410768.png";>
    
    <img width="709" alt="2017-02-07 2 56 33" 
src="https://cloud.githubusercontent.com/assets/6477701/22659666/d6649d66-ece1-11e6-88bf-310d8d0da5c4.png";>
    
    ## How was this patch tested?
    
    Manually tested the doctests.
    
    ```
     ./run-tests.py --python-executables=python2.6 --modules=pyspark-sql
     ./run-tests.py --python-executables=python3.6 --modules=pyspark-sql
    ```
    
    Closes #15053

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/HyukjinKwon/spark SPARK-18069

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/16824.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #16824
    
----
commit 00c8af35b704e989ad8536490f310a35c2e721fb
Author: hyukjinkwon <gurwls...@gmail.com>
Date:   2017-02-06T15:42:04Z

    Make doctests self-contained

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to