title: pandas string column of base64 to hex
body: <p>So, I have a pandas dataframe which is classified as 'object', but is actually base64 encoded payload, which I want to convert into hex.</p>
  
  <pre><code>raw
  AIgIm/H/SfwAR2IBAgMgAgIAAQMCAFoAcQAAAAAAAAFxAAAAAAAAA4gAAABiAF8AABI=
  AIgIm/v/SfsAUNwBAgMgAgIAEgMCAEIAcQAAAAAAAAFxAAAAAAAAA4gAAABkAF8AAAw=
  AIgIm/z/Sg4AVroBAgMgAgIA6wMCAFgAcQAAAAAAAAFxAAAAAAAAA4geAAFEADoAGQs=
  </code></pre>
  
  <p>Using <a href="https://cryptii.com/base64-to-hex" rel="nofollow noreferrer">https://cryptii.com/base64-to-hex</a> I get these values (which is what I expect):</p>
  
  <pre><code>new_raw
  00 88 08 9b f1 ff 49 fc 00 47 62 01 02 03 20 02 02 00 01 03 02 00 5a 00 71 00 00 00 00 00 00 01 71 00 00 00 00 00 00 03 88 00 00 00 62 00 5f 00 00 12
  00 88 08 9b fb ff 49 fb 00 50 dc 01 02 03 20 02 02 00 12 03 02 00 42 00 71 00 00 00 00 00 00 01 71 00 00 00 00 00 00 03 88 00 00 00 64 00 5f 00 00 0c
  00 88 08 9b fc ff 4a 0e 00 56 ba 01 02 03 20 02 02 00 eb 03 02 00 58 00 71 00 00 00 00 00 00 01 71 00 00 00 00 00 00 03 88 1e 00 01 44 00 3a 00 19 0b
  </code></pre>
  
  <p>Based on similar questions previously asked, I've tried:</p>
  
  <pre><code>df['new_raw'] = df['raw'].apply(lambda x: x.decode("base64").encode("hex"))
  </code></pre>
  
  <p>But this gives me:</p>
  
  <pre><code>AttributeError: 'str' object has no attribute 'decode'` error.
  </code></pre>