title: How to put all element into single column in pyspark?
body: <p>The csv file like as below column 1 for author name and rest of columns for authors book. data like</p>
  
  <p>david, c-first,c++-first,java_2_test, ............ 100 </p>
  
  <p>smith,c_in_smit,d_programming_smit ................120</p>
  
  <p>i need to put first colomn in author name and other in book column.</p>
  
  <pre><code>from pyspark.sql import SQLContext, Row
  sqlContext = SQLContext(sc)
  # Load a text file and convert each line to a Row.
  lines = sc.textFile("people.txt")
  parts = lines.map(lambda l: l.split(","))
  people = parts.map(lambda p: Row(author=p[0], author=(p[1]+ "," + p[2])))
  # Infer the schema, and register the DataFrame as a table.
  schemaPeople = sqlContext.createDataFrame(people)
  schemaPeople.createOrReplaceTempView("people")
  </code></pre>
  
  <p>But the problem is the author book can be one or more .</p>