title: Trim in a Pyspark Dataframe
body: <p>I have a Pyspark dataframe(<strong>Original Dataframe</strong>) having below data(all columns have string datatype). In my use case i am not sure of what all columns are there in this input dataframe. User just pass me the name of dataframe and ask me to trim all the columns of this dataframe. Data in a typical dataframe looks like as below:</p>
  
  <pre><code>  id              Value         Value1
     1               "Text "       "Avb"
     2               1504         " Test"
     3               1               2
  </code></pre>
  
  <p>Is there anyway i can do it without being dependent on what all columns are present in this dataframe and get all the column trimmed in this dataframe. Data after trimming aall the columns of dataframe should look like. </p>
  
  <pre><code>   id             Value        Value1
     1               "Text"       "Avb"
     2               1504         "Test"
     3               1               2
  </code></pre>
  
  <p>Can someone help me out? How can i achieve it using Pyspark dataframe? Any help will be appreciated.</p>