title: Decode Base64 within Spark Dataframe
body: <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>key</th>
  <th>value</th>
  <th>topic</th>
  <th>partition</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>null</td>
  <td><code>dGVzdF90ZXh0</code></td>
  <td>Topic.Name</td>
  <td>0</td>
  </tr>
  <tr>
  <td>null</td>
  <td><code>dGVzdF90ZXh0</code></td>
  <td>Topic.Name</td>
  <td>0</td>
  </tr>
  <tr>
  <td>null</td>
  <td><code>dGVzdF90ZXh0</code></td>
  <td>Topic.Name</td>
  <td>0</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p><code>df_1</code></p>
  <p>I have a Spark dataframe where the column <code>value</code> is a Base64 encoded. I would like to be able to add a column at the end of the dataframe with an unencoded version of it.</p>
  <pre><code>import base64
  
  df_2 = df_1.withColumn('unencoded_base64',base64.b64decode(df_1.value))
  </code></pre>
  <p>The above code gives me the error:</p>
  <pre><code>TypeError: a2b_base64() argument 1 must be convertible to a buffer, not Column
  </code></pre>