You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2015/05/11 23:37:37 UTC

spark git commit: [SPARK-7516] [Minor] [DOC] Replace depreciated inferSchema() with createDataFrame()

Repository: spark
Updated Branches:
  refs/heads/master 6e9910c21 -> 8e674331d


[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 <ch...@gmail.com>

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

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


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

Branch: refs/heads/master
Commit: 8e674331d9ce98068b44e4d483b6d35cef0648fa
Parents: 6e9910c
Author: gchen <ch...@gmail.com>
Authored: Mon May 11 14:37:18 2015 -0700
Committer: Reynold Xin <rx...@databricks.com>
Committed: Mon May 11 14:37:18 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/8e674331/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: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org