title: Pandas Python: Cast array type to int
body: <p>I have a dataframe that looks like this:</p>
  
  <pre><code>In [169]: dfstacked
  Out[169]:
      Percent Held  Rank
  0          14.10   [1]
  1          11.13   [2]
  2          10.11   [3]
  3           8.99   [4]
  4           4.79   [5]
  5           2.92   [6]
  6           2.79   [7]
  7           2.63   [8]
  8           2.63   [9]
  9           1.83  [10]
  10          1.81  [11]
  11          1.66  [12]
  12          1.66  [13]
  13          1.64  [14]  
  14          1.63  [15]
  15          1.62  [16]
  16          1.26  [17]
  17          1.08  [18]
  18          1.08  [19]
  19          1.07  [20]
  </code></pre>
  
  <p>The underlying datatype of <code>dfstacked["Rank"]</code> is array. I created it using a regex (using <code>str.findall()</code>), but to be safe I check: </p>
  
  <pre><code>In [171]: dfstacked["Rank"].dtype
  Out[171]: dtype('O')
  </code></pre>
  
  <p>However, I want to cast <code>dfstacked["Rank"]</code> to an <code>Series</code> with <code>int</code> datatype so that I can perform some statistical tests on the values in <code>dfstacked["Rank"]</code>. How would I go about doing this? </p>
  
  <p>So far I have tried to force an integer Series using <code>Series.map</code> and <code>Series.astype()</code>. Both return ValueErrors. </p>
  
  <p>Ultimately, I want</p>
  
  <pre><code>    Percent Held  Rank
  0          14.10   1
  1          11.13   2
  2          10.11   3
  3           8.99   4
  4           4.79   5
  5           2.92   6
  6           2.79   7
  7           2.63   8
  8           2.63   9
  9           1.83   10
  10          1.81   11
  11          1.66   12
  12          1.66   13
  13          1.64   14  
  14          1.63   15 
  15          1.62   16
  16          1.26   17 
  17          1.08   18
  18          1.08   19
  19          1.07   20
  </code></pre>