title: How do I create a seaborn line plot for PySpark dataframe?
body: <p>I have a data frame with three columns and I am trying to do a line plot using Seaborn library but it throws me an error saying that <code>'DataFrame' object has no attribute 'get'</code>. Here is my test data frame</p>
  
  <pre><code>Age variable    value
  31  Overall 69.76751118
  31  Potential   69.76751118
  31  Growth  0
  34  Overall 68.91176471
  34  Potential   68.91176471
  34  Growth  0
  28  Overall 69.05803996
  28  Potential   69.05803996
  28  Growth  0.24643197
  </code></pre>
  
  <p>This is what I am trying to do using the seaborn line plot after reading in the csv file</p>
  
  <pre><code>test = spark.read.csv("test.csv", inferSchema=True, header=True)
  sns.lineplot(x = "Age", y = "value", hue = "variable", data = test)
  </code></pre>
  
  <p>And the error that I get is this</p>
  
  <pre><code>AttributeError: 'DataFrame' object has no attribute 'get'
  </code></pre>
  
  <p>However when I convert the data frame to Pandas data frame and use exactly the same seaborn code it works</p>
  
  <pre><code>test_df = test.toPandas()
  sns.lineplot(x = "Age", y = "value", hue = "variable", data = test_df)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/RkgYx.png" rel="noreferrer"><img src="https://i.stack.imgur.com/RkgYx.png" alt="enter image description here"></a></p>
  
  <p>Am I doing anything wrong with Spark Data frames.</p>