title: When sum() a column I get this error AttributeError: 'DataFrame' object has no attribute 'sum'
body: <p>I have a dataframe like this:</p>
  
  <pre><code>+-----+--------+
  |count| country|
  +-----+--------+
  |   12| Ireland|
  |    5|Thailand|
  +-----+--------+
  </code></pre>
  
  <p>when I add  sum() function to get the total of the first column 'count' I get this error : </p>
  
  <pre><code> AttributeError: 'DataFrame' object has no attribute 'sum'
  </code></pre>
  
  <p>I do import the <code>from pyspark.sql.functions import sum</code> </p>
  
  <p>How do I sum or what am I missing? </p>
  
  <p>Thank you and appreciate any help.</p>