Repository: spark
Updated Branches:
  refs/heads/branch-1.4 779174a5f -> 1538b10e8


[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 <[email protected]>

Closes #6041 from gchen/python-docs and squashes the following commits:

c27eb7c [gchen] replace inferSchema() with createDataFrame()

(cherry picked from commit 8e674331d9ce98068b44e4d483b6d35cef0648fa)
Signed-off-by: Reynold Xin <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/1538b10e
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/1538b10e
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/1538b10e

Branch: refs/heads/branch-1.4
Commit: 1538b10e8b0d681dea4f2718c272a46593fd165e
Parents: 779174a
Author: gchen <[email protected]>
Authored: Mon May 11 14:37:18 2015 -0700
Committer: Reynold Xin <[email protected]>
Committed: Mon May 11 14:37:43 2015 -0700

----------------------------------------------------------------------
 docs/sql-programming-guide.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/1538b10e/docs/sql-programming-guide.md
----------------------------------------------------------------------
diff --git a/docs/sql-programming-guide.md b/docs/sql-programming-guide.md
index df4c123..6af1043 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.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to