You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yuming Wang (JIRA)" <ji...@apache.org> on 2016/08/02 08:19:20 UTC

[jira] [Commented] (SPARK-16846) read.csv() option: "inferSchema" don't work

    [ https://issues.apache.org/jira/browse/SPARK-16846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15403592#comment-15403592 ] 

Yuming Wang commented on SPARK-16846:
-------------------------------------

You may need to be remove -schema-. The following code works:
{code:java}
val df = spark.read.options(Map("header" -> "true", "inferSchema" -> "true")).csv(path)
{code} 


> read.csv()  option:  "inferSchema" don't work
> ---------------------------------------------
>
>                 Key: SPARK-16846
>                 URL: https://issues.apache.org/jira/browse/SPARK-16846
>             Project: Spark
>          Issue Type: Bug
>            Reporter: hejie
>
> I use the code to read file and get a dataframe. When the colum number is olny 20, the inferSchema paragrama work well. But when the number is up to 400, it doesn't work, and I have to tell it the schema manually. the code is :
>  val df = spark.read.schema(schema).options(Map("header"->"true","quote"->",","inferSchema"->"true")).csv("/Users/ss/Documents/traindata/traindataAllNumber.csv")



--
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