title: Convert column of binary string to int in spark dataframe python
body: <p>So I have a dataframe with one column like this:</p>
  <pre><code>+----------+
  |some_colum|
  +----------+
  |        10|
  |        00|
  |        00|
  |        10|
  |        10|
  |        00|
  |        10|
  |        00|
  |        00|
  |        10|
  +----------+
  </code></pre>
  <p>where the column some_colum are binary strings.</p>
  <p>I want to convert this column to decimal.</p>
  <p>I've tried doing</p>
  <pre><code>data = data.withColumn(&quot;some_colum&quot;, int(col(&quot;some_colum&quot;), 2))
  </code></pre>
  <p>But this doesn't seem to work. as I get the error:</p>
  <pre><code>int() can't convert non-string with explicit base
  </code></pre>
  <p>I think cast() might be able to do the job but I'm unable to figure it out. Any ideas?</p>