title: Converting column to/from hex in PySpark using Python
body: <p>I have a DataFrame (converted from PySpark RDD using .toDF) that contains a few columns of data.  One column contains values in hex format, eg.:</p>
  <pre><code>+----------+
  |        id|
  +----------+
  |0x0087AFEE|
  |0x00840190|
  |0x0082F4D3|
  |0x00871A60|
  |0x00850A0E|
  |0x0084557C|
  ...
  </code></pre>
  <p>In another DataFrame I have the same ID, but in decimal values, which I want to join with this column.  I assume I need to convert these values to base 10 decimal first (or vice versa) in order to compare.  How can I accomplish this?</p>
  <p>I tried:</p>
  <pre><code>    df.withColumn('dec_id', sf.conv(df['id'], 16, 10))
  </code></pre>
  <p>but this gives back 0's.</p>