title: Extract non- empty values from columns of a dataframe in python
body: <p>This is a follow up of this question: <a href="https://stackoverflow.com/questions/37099920/extract-non-empty-values-from-the-regex-array-output-in-python">Extract non- empty values from the regex array output in python</a></p>
  
  <p>I have a DF with columns "col" and "col1" of type 'numpy.ndarray' and looks like :</p>
  
  <pre><code>       col                         col1
     [[5, , , ,]]             [qwe,ret,der,po]
     [[, 4, , ,][, , 5, ]]       [fgk,hfrt]
          []                           []
     [[, , , 9]]                  [test]  
  </code></pre>
  
  <p>I want my output as:</p>
  
  <pre><code>      col  col1
         5  qwe,ret,der,po
         5  fgk,hfrt
         0  NOT FOUND 
         9  test
  </code></pre>
  
  <p>Please note column "col", second row has maximum of the two entries in the output.
  I tried the solution provided in the above link but its giving ValueError "The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()"</p>
  
  <p>Thanks</p>
  
  <p>Edit:
  Dictionary form of my DF with column "col":</p>
  
  <pre><code>  {'col': {0: array([['5', '', '', '', '', '']],
    dtype='|S1'), 1: array([], dtype=float64), 2: array([], dtype=float64), 3: array([], dtype=float64), 4: array([], dtype=float64), 5: array([['8', '', '', '', '', '']],
    dtype='|S1'), 6: array([], dtype=float64), 7: array([], dtype=float64), 8: array([], dtype=float64), 9: array([], dtype=float64), 10: array([], dtype=float64), 11: array([['', '8', '', '', '', '']],
    dtype='|S1'), 12: array([], dtype=float64), 13: array([], dtype=float64), 14: array([], dtype=float64), 15: array([['7', '', '', '', '', '']],
    dtype='|S1'), 16: array([], dtype=float64)}}
  </code></pre>