title: Input row doesn't have expected number of values required by the schema
body: <p>I'm reading data from a <code>csv</code> file with 7 million rows. Sample data in that file-</p>
  
  <pre><code>"dfg.AAIXpWU4Q","1"
  "cvbc.AAU3aXfQ","1"
  "T-L5aL1uT_OfFbk","1"
  "D9TOXrA_LsQa-awVk","2"
  "JWg8_0lGDWcH_9aDc","2"
  "ewrq.AAbCVh5wA","1"
  "ewrq.AALAC-Qku3heg","1"
  "ewrq.AADSmhJ7A","2"
  "ewrq.AAEAoHUNA","1"
  "ewrq.AALfV5u-7Yg","1"
  </code></pre>
  
  <p>And I read it like-</p>
  
  <pre><code>&gt;&gt;&gt; rdd = sc.textFile("/path/to/file/*")
  
  &gt;&gt;&gt; rdd.take(2)
  ['"7wAfdgdfgd","7"', '"1x3Qdfgdf","1"']
  ​
  # reading the RDD into a dataframe
  &gt;&gt;&gt; my_df = rdd.map(lambda x: (x.split(","))).toDF()
  
  # changing column names
  &gt;&gt;&gt; df1 = my_df.selectExpr("_1 as user_id", "_2 as hits")
  
  &gt;&gt;&gt; df1.show(3)
  +-------+----+
  |user_id|hits|
  +-------+----+
  |"aYk...| "7"|
  |"yDQ...| "1"|
  |"qUU...|"13"|
  +-------+----+
  only showing top 3 rows
  
  &gt;&gt;&gt; df2 = df1.sort(col('hits').desc())
  &gt;&gt;&gt; df2.show(10)
  </code></pre>
  
  <p>But this gives me the following error-</p>
  
  <p><code>Input row doesn't have expected number of values required by the schema. 2 fields are required while 18 values are provided.</code></p>
  
  <p>I'm guessing it's the way I convert the RDD to DF. Maybe the <code>x.split(",")</code> is not taking into account the bad data - how do I get around this issue?</p>