title: Convert a spark DataFrame to pandas DF
body: <p>Is there a way to convert a Spark Df (not RDD) to pandas DF</p>
  
  <p>I tried the following:</p>
  
  <pre><code>var some_df = Seq(
   ("A", "no"),
   ("B", "yes"),
   ("B", "yes"),
   ("B", "no")
  
   ).toDF(
  "user_id", "phone_number")
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>%pyspark
  pandas_df = some_df.toPandas()
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code> NameError: name 'some_df' is not defined
  </code></pre>
  
  <p>Any suggestions.</p>