title: Adding a column in Dataframe with a specific property in python
body: <p>I have the following dataframe,</p>
  <pre><code>df = pd.DataFrame({'a':[[1,2],[2,3],[1]],'b':[2,4,1]})
  </code></pre>
  <p>which looks like,</p>
  <pre><code>    a       b
  0   [1, 2]  2
  1   [2, 3]  4
  2   [1]     1
  </code></pre>
  <p>Now, I want to add a column in this dataframe whose elements are that value in each list of column 'a' whose absolute difference with corresponding value in column 'b' is minimum.
  i.e. I want to add a column 'c' in my dataframe, such that my df becomes,</p>
  <pre><code>   a     b  c
  0 [1,2]  2  2
  1 [2,3]  4  3
  2 [1]    1  1
  </code></pre>
  <p>I tried using lambda function, but couldn't do it.</p>