title: Sum a column in dataframe and return results as int
body: <p>I have a pyspark dataframe with a column of numbers(amount). I need to sum that column(amount) and then have the result return as an int in a python variable.</p>
  
  <p>Dataset looks like this:</p>
  
  <pre><code>date,p1id,p2id,amount,p3id
  1/1/2013,U2_P1,p@c.com,100,P_P
  </code></pre>
  
  <p>With the date grouping and aggregation by sum.</p>
  
  <pre><code>groupby_revenue = df.groupby(['date']).sum()
  print(groupby_revenue)
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>DataFrame[visitdate: string]
  </code></pre>
  
  <p>original output:</p>
  
  <pre><code>1/1/2013    13000
  1/1/2014    16090
  1/1/2015    17330
  </code></pre>