title: Replace NaN with empty list in a pandas dataframe
body: <p>I'm trying to replace some NaN values in my data with an empty list []. However the list is represented as a str and doesn't allow me to properly apply the len() function. is there anyway to replace a NaN value with an actual empty list in pandas?</p>
  
  <pre><code>In [28]: d = pd.DataFrame({'x' : [[1,2,3], [1,2], np.NaN, np.NaN], 'y' : [1,2,3,4]})
  
  In [29]: d
  Out[29]:
             x  y
  0  [1, 2, 3]  1
  1     [1, 2]  2
  2        NaN  3
  3        NaN  4
  
  In [32]: d.x.replace(np.NaN, '[]', inplace=True)
  
  In [33]: d
  Out[33]:
             x  y
  0  [1, 2, 3]  1
  1     [1, 2]  2
  2         []  3
  3         []  4
  
  In [34]: d.x.apply(len)
  Out[34]:
  0    3
  1    2
  2    2
  3    2
  Name: x, dtype: int64
  </code></pre>