title: Splitting a string into list and converting the items to int
body: <p>I have a pandas dataframe where I have a column <code>values</code> like this:</p>
  
  <pre><code>0       16 0
  1    7 1 2 0
  2          5
  3          1
  4         18
  </code></pre>
  
  <p>What I want is to create another column, <code>modified_values</code>, that contains a list of all the different numbers that I will get after splitting each value. The new column will be like this:</p>
  
  <pre><code>0       [16, 0]
  1    [7, 1, 2, 0]
  2          [5]
  3          [1]
  4         [18]
  </code></pre>
  
  <p><strong>Beware</strong> the values in this list should be <code>int</code> and not <code>strings</code>.</p>
  
  <p>Things that I am aware of:</p>
  
  <p>1) I can split the column in a vectorized way like this
  <code>df.values.str.split(" ")</code>. This will give me the list but the objects inside the list will be strings. I can add another operation on top of that like this <code>df.values.str.split(" ").apply(func to convert values to int)</code> but that wouldn't be vectorized</p>
  
  <p>2) I can directly do this <code>df['modified_values']= df['values'].apply(func that splits as well as converts to int)</code></p>
  
  <p>The second one will be much slower than the first for sure but I am wondering if the same thing can be achieved in a vectorized way.</p>