title: Pandas is not empty but gets max() arg is an empty sequence
body: <p>This is toy data and it works fine to get the max index of <code>True</code> from each list of <code>Pandas</code> column <code>allmz</code> into  <code>lastprec</code></p>
  
  <pre><code>df = pd.DataFrame({'time': pd.Series([1,1,1,3,3]),'allmz':([[True,True,True],[True,False,True],[False,True,False],[True,True,False],[True,False,False]]),'allint':([[11,31,31],[21,41,51],[41,51,51],[11,31,51],[1,51,11]])})
  
  df['lastprec'] = df['allmz'].apply(lambda aa: max([i for i, x in enumerate(aa) if x]))
  print df
  
  &gt;&gt;&gt;OUT
           allint                 allmz  time  lastprec
  0  [11, 31, 31]    [True, True, True]     1         2
  1  [21, 41, 51]   [True, False, True]     1         2
  2  [41, 51, 51]  [False, True, False]     1         1
  3  [11, 31, 51]   [True, True, False]     3         1
  4   [1, 51, 11]  [True, False, False]     3         0
  </code></pre>
  
  <p>However, in my real data, I got <code>ValueError: max() arg is an empty sequence</code>. Only thing that is different is I open that <code>DataFrame</code> from Excel (but the toy data is not imported) by <code>ref_df = pd.read_excel(ref_file, sheetname=ref_worksheet)</code>. Can this be a reason why I get this error? Or there is something else? I check the real data <code>allmz</code>, it is not empty and the data type is <code>list</code>. What can I fix to get the max index of the real data?</p>