title: Getting the first item of a split string list in a Pandas series
body: <p>If I need to split a string and get the first item, that's fine with:</p>
  <pre><code>string = &quot;AAA_BBB&quot;
  string.split(&quot;_&quot;)[0]
  &gt; &quot;AAA&quot;
  </code></pre>
  <p>But if try to do the same with a Pandas series (given the series has the same string format), the <code>[0]</code> doesn't work.</p>
  <pre><code>df[&quot;string&quot;].str.split(&quot;_&quot;)[0]
  &gt; KeyError: 0
  </code></pre>
  <p>But the part before the <code>[0]</code> works fine</p>
  <pre><code>1 [AAA, BBB]
  2 [BBB, CCC]
  3 [DDD, EEE]
  4 [DDD, AAA]
  5 [EEE, CCC]
  </code></pre>
  <p>I'm trying to do this to assign the first element to a new column like so:</p>
  <pre><code>df[&quot;new_column&quot;] = df[&quot;string&quot;].str.split(&quot;_&quot;)[0]
  </code></pre>