title: dataframe object is not callable in pyspark
body: <pre><code>temp = Window.partitionBy("id").orderBy("time").rowsBetween(-5, 5)
  spark_df.withColumn("movingAvg",fn.avgspark_df("average")).over(temp)).show()
  </code></pre>
  
  <p>I'm getting this error in the last line .</p>
  
  <blockquote>
    <p>dataframe object is not callable</p>
  </blockquote>