Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • What are you trying to accomplish? Commented Jul 26, 2016 at 16:28
  • assign the column names to a data frame Commented Jul 26, 2016 at 16:48
  • Possible duplicate of How to change dataframe column names in pyspark? Commented Jul 26, 2016 at 17:30
  • I am aware of that post. I am just thinking 'toDF' is more convenient and it worked for me before. spark.apache.org/docs/1.6.1/api/python/pyspark.sql.html Commented Jul 26, 2016 at 21:02
  • I figured it out. Looks like it has to do with our spark version. It worked with 1.6. Commented Jul 27, 2016 at 20:32