title: Pandas Dataframe: Sort list column in dataframe
body: <p>I have dataframe as below:</p>
  
  <pre><code>   |            types |     TypeList
  0  |    Q11424 (item) |  Q11424 (item),Q571 (item)
  1  |      Q571 (item) |  Q10 (item),Q24 (item)
  0  |    Q11012 (item) |  Q3 (item)
  0  |  Q4830453 (item) |  Q4 (item)
  0  |  Q7725634 (item) |  Q67 (item),Q12 (item)
  </code></pre>
  
  <p>I want to sort elements in TypeList column in ascending order. i.e. each row of typelist should be sorted based on the integer part of it. I basically want output as below:</p>
  
  <pre><code>   |            types |     TypeList
  0  |    Q11424 (item) |  Q571 (item),Q11424 (item)
  1  |      Q571 (item) |  Q10 (item),Q24 (item)
  0  |    Q11012 (item) |  Q3 (item)
  0  |  Q4830453 (item) |  Q4 (item)
  0  |  Q7725634 (item) |  Q12 (item),Q67 (item)
  </code></pre>
  
  <p>I am able to remove all characters from this TypeList column, keeping only "," seperated strings and further converted it to list i.e. each row of this column is now list of type strings. I wanted to apply sort on that, so I did something like below:</p>
  
  <pre><code>df.TypeList.apply(lambda x: (int(y) for y in x))
  </code></pre>
  
  <p>but it give result dataframe having all row values as </p>
  
  <pre><code>&lt;generator object &lt;lambda&gt;.&lt;locals&gt;.&lt;genexpr&gt; ...
  </code></pre>
  
  <p>I am not sure how to solve this issue. Can someone help me to resolve it.</p>
  
  <p>Thanks in advance.</p>