You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Karen Yin-Yee Ng (JIRA)" <ji...@apache.org> on 2015/08/11 02:58:46 UTC

[jira] [Created] (SPARK-9807) pyspark.sql.createDataFrame does not infer data type of parsed TSV

Karen Yin-Yee Ng created SPARK-9807:
---------------------------------------

             Summary: pyspark.sql.createDataFrame does not infer data type of parsed TSV
                 Key: SPARK-9807
                 URL: https://issues.apache.org/jira/browse/SPARK-9807
             Project: Spark
          Issue Type: Bug
          Components: PySpark
    Affects Versions: 1.4.1
         Environment: CentOS 6, Python version 2.7.10, Scala version 2-10 
            Reporter: Karen Yin-Yee Ng


I tried parsing a space-separated file from HDFS.
And using `pyspark.sqlContext.createDataFrame` to convert the parsed lines to a PySpark DataFrame. However, all entries are parsed as string type regardless of what the correct data type is.

An example of my code and output can be found at:
https://gist.github.com/karenyyng/a1264d6344c54df4fcc5




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org