aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/sql/dataframe.py
diff options
context:
space:
mode:
authorNicholas Chammas <nicholas.chammas@gmail.com>2016-07-28 14:57:15 -0700
committerReynold Xin <rxin@databricks.com>2016-07-28 14:57:15 -0700
commit274f3b9ec86e4109c7678eef60f990d41dc3899f (patch)
tree2394c6f1ff3e51bd9ea6bd2b365c1e7068c61295 /python/pyspark/sql/dataframe.py
parent3fd39b87bda77f3c3a4622d854f23d4234683571 (diff)
downloadspark-274f3b9ec86e4109c7678eef60f990d41dc3899f.tar.gz
spark-274f3b9ec86e4109c7678eef60f990d41dc3899f.tar.bz2
spark-274f3b9ec86e4109c7678eef60f990d41dc3899f.zip
[SPARK-16772] Correct API doc references to PySpark classes + formatting fixes
## What's Been Changed The PR corrects several broken or missing class references in the Python API docs. It also correct formatting problems. For example, you can see [here](http://spark.apache.org/docs/2.0.0/api/python/pyspark.sql.html#pyspark.sql.SQLContext.registerFunction) how Sphinx is not picking up the reference to `DataType`. That's because the reference is relative to the current module, whereas `DataType` is in a different module. You can also see [here](http://spark.apache.org/docs/2.0.0/api/python/pyspark.sql.html#pyspark.sql.SQLContext.createDataFrame) how the formatting for byte, tinyint, and so on is italic instead of monospace. That's because in ReST single backticks just make things italic, unlike in Markdown. ## Testing I tested this PR by [building the Python docs](https://github.com/apache/spark/tree/master/docs#generating-the-documentation-html) and reviewing the results locally in my browser. I confirmed that the broken or missing class references were resolved, and that the formatting was corrected. Author: Nicholas Chammas <nicholas.chammas@gmail.com> Closes #14393 from nchammas/python-docstring-fixes.
Diffstat (limited to 'python/pyspark/sql/dataframe.py')
-rw-r--r--python/pyspark/sql/dataframe.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/pyspark/sql/dataframe.py b/python/pyspark/sql/dataframe.py
index 0cbb3adfa8..a986092f5d 100644
--- a/python/pyspark/sql/dataframe.py
+++ b/python/pyspark/sql/dataframe.py
@@ -196,7 +196,7 @@ class DataFrame(object):
@property
@since(1.3)
def schema(self):
- """Returns the schema of this :class:`DataFrame` as a :class:`types.StructType`.
+ """Returns the schema of this :class:`DataFrame` as a :class:`pyspark.sql.types.StructType`.
>>> df.schema
StructType(List(StructField(age,IntegerType,true),StructField(name,StringType,true)))