title: Using function on tuples on list works in Google Colab, but not on local machine
body: <p>I can't figure out what's going on. In my google colab environment, I have a dataframe that looks like the below using spaCy's named entity extraction on snippets from NYT:</p>
  <pre><code>raw_data = {'id': [1,2,3],
          'ents': [[(('PARIS', 'GPE'), 6), (('French', 'NORP'), 3), (('France', 
           'GPE'), 1)],
             [(('CHINA','GPE'), 3), (('British', 'NORP'), 2), (('Hong Kong', 
             'GPE'), 1)],
         [(('Chile','GPE'), 3), (('spanish', 'NORP'), 1), (('Hong Kong', 'GPE'), 
         1)]]}
  
  df = pd.DataFrame(raw_data)
  </code></pre>
  <p>I apply a function to get back only ents where the entity exceeds a count threshold,</p>
  <pre><code>def limit_ents(ents):
      for i in ents:
          if i[1] &gt;=2:
              return [i[0][0] for i in ents]
  
  df['limit_ents'] = df['ents'].apply(limit_ents)
  </code></pre>
  <p>This all works fine in Google Colab, but when I do this on my local machine, I get IndexError: string index out of range pointing to the line in the function &quot;if ent[1] &gt;=2:</p>
  <p>Is this a runnning pandas on Linux vs. Windows thing? I'm running pandas 1.1.3 in both places. Am I doing something incredibly stupid?</p>
  <p>Thanks for everyone's help in advance.</p>