title: pyspark AttributeError: 'DataFrame' object has no attribute 'toDF'
body: <p>The following code worked for me before, but not anymore. I got the error:</p>
  
  <blockquote>
    <p>AttributeError: 'DataFrame' object has no attribute 'toDF'</p>
  </blockquote>
  
  <pre><code>if __name__ == "__main__":
    sc = SparkContext(appName="test")
    sqlContext = SQLContext(sc)
  
    df = sqlContext.read.format('com.databricks.spark.csv').\
      options(header='false',delimiter=',',inferSchema='true').load('test')
  
    ### rename columns
    df = df.toDF('a','b','c')
    ...
    sc.stop()
  </code></pre>