aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorgchen <chenguancheng@gmail.com>2015-05-11 14:37:18 -0700
committerReynold Xin <rxin@databricks.com>2015-05-11 14:37:18 -0700
commit8e674331d9ce98068b44e4d483b6d35cef0648fa (patch)
tree62316c943c0a110864db0d33939439752dce6499 /docs
parent6e9910c21ada19ae14122b5f14a6a30845b98229 (diff)
downloadspark-8e674331d9ce98068b44e4d483b6d35cef0648fa.tar.gz
spark-8e674331d9ce98068b44e4d483b6d35cef0648fa.tar.bz2
spark-8e674331d9ce98068b44e4d483b6d35cef0648fa.zip
[SPARK-7516] [Minor] [DOC] Replace depreciated inferSchema() with createDataFrame()
JIRA: https://issues.apache.org/jira/browse/SPARK-7516 In sql-programming-guide, deprecated python data frame api inferSchema() should be replaced by createDataFrame(): schemaPeople = sqlContext.inferSchema(people) -> schemaPeople = sqlContext.createDataFrame(people) Author: gchen <chenguancheng@gmail.com> Closes #6041 from gchen/python-docs and squashes the following commits: c27eb7c [gchen] replace inferSchema() with createDataFrame()
Diffstat (limited to 'docs')
-rw-r--r--docs/sql-programming-guide.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/sql-programming-guide.md b/docs/sql-programming-guide.md
index df4c123bdd..6af10432b9 100644
--- a/docs/sql-programming-guide.md
+++ b/docs/sql-programming-guide.md
@@ -470,7 +470,7 @@ parts = lines.map(lambda l: l.split(","))
people = parts.map(lambda p: Row(name=p[0], age=int(p[1])))
# Infer the schema, and register the DataFrame as a table.
-schemaPeople = sqlContext.inferSchema(people)
+schemaPeople = sqlContext.createDataFrame(people)
schemaPeople.registerTempTable("people")
# SQL can be run over DataFrames that have been registered as a table.