title: Trim string column in PySpark dataframe
body: <p>After creating a Spark DataFrame from a CSV file, I would like to trim a column. I've tried:</p>
  
  <pre class="lang-python prettyprint-override"><code>df = df.withColumn(&quot;Product&quot;, df.Product.strip())
  </code></pre>
  <p><code>df</code> is my data frame, <code>Product</code> is a column in my table.</p>
  <p>But I get the error:</p>
  <blockquote>
  <p>Column object is not callable</p>
  </blockquote>