title: Pandas str.split() not working in for loop (jupyter)
body: <p>I am working with a Pandas DataFrame of sports scores which contains a Series 'Score'.  All items in this Series contain both team's scores in a single string, separated by hyphen, with no spaces, for example</p>
  
  <pre><code>('25-7', '6-2', ...)
  </code></pre>
  
  <p>I am attempting to split each value into 2 separate lists: left_score and right_score using Jupyter notebook.  I have used the <code>str.split('-')</code> method for Series, which is supposed to convert each string into a list such that my scores would be </p>
  
  <pre><code>['25','7'], ['6','2']
  </code></pre>
  
  <p>However, when I run this it executes, but it does not recognize the hyphen, and returns the entire string as index 0.</p>
  
  <p>I have tried using '-' and "-" with no difference.  I also tried using a <code>for</code> loop and using the Python core <code>str.split()</code>.  The core function works on a standalone string in Jupyter as expected, but when run in a loop, it again returns the entire string as the only element.</p>
  
  <p>I've tried accessing the strings within the Series directly as well, and the function still fails. The following should return '25', but it returns '25-7'.</p>
  
  <pre><code>dataframe_name.Score.str.split("-").str[0][0]`
  </code></pre>
  
  <p>Really enjoying working with Pandas and DataFrames, but the syntax is proving a challenge - any thoughts appreciated.</p>
  
  <p>EDIT: Adding sample code as requested.  Note this is across multiple Jupyter cells, but I am executing them in sequence.</p>
  
  <p>In[1]:</p>
  
  <pre><code>import numpy as np
  import pandas as pd
  import matplotlib.pyplot as plt
  %matplotlib inline
  
  df = pd.read_csv('./file_name.csv', sep='\t')
  
  df.head(3)
  </code></pre>
  
  <p>Out[1]:</p>
  
  <pre><code>df
  _    Score
  0    25-7
  1    6-2
  2    4-4
  </code></pre>
  
  <p>In[2]:</p>
  
  <pre><code># Thanks to user Pygo, I attempted the suggested solution to no avail:
  df['Score'].str.split('-',n=1,expand=False).values.tolist()
  </code></pre>
  
  <p>Out[2]:</p>
  
  <pre><code>[['25-7'],
  ['6-2'],
  ['4-4'],
  ... ]
  </code></pre>
  
  <ul>
  <li>Jupyter Notebook version 5.5.0 </li>
  <li>Anaconda version 5.2.0 </li>
  <li>Python version 3.6.5 </li>
  <li>Pandas version 0.23.0</li>
  <li>Numpy version 1.14.3</li>
  </ul>
  
  <p>Is it possible there is a version or reference conflict?</p>
  
  <p>EDIT2:</p>
  
  <p>I tried iterating through each letter in the string to perform the split function manually, and have now discovered that <code>.join()</code>, <code>+=</code> are not working inside of <code>for</code> loops either.  Where would I look for a Pandas and/or Core String malfunction in Jupyter Notebook loops?</p>