Convert spark DataFrame column to python list
<p>I work on a dataframe with two column, mvv and count.</p>

<pre><code>+---+-----+
|mvv|count|
+---+-----+
| 1 |  5  |
| 2 |  9  |
| 3 |  3  |
| 4 |  1  |
</code></pre>

<p>i would like to obtain two list containing mvv values and count value. Something like</p>

<pre><code>mvv = [1,2,3,4]
count = [5,9,3,1]
</code></pre>

<p>So, I tried the following code: The first line should return a python list of row. I wanted to see the first value:</p>

<pre><code>mvv_list = mvv_count_df.select('mvv').collect()
firstvalue = mvv_list[0].getInt(0)
</code></pre>

<p>But I get an error message with the second line:</p>

<blockquote>
  <p>AttributeError: getInt</p>
</blockquote>