title: How to split strings inside a numpy array?
body: <p>I have the following table:</p>
  
  <p>As the column 'location' has the state repeating inside it, I am trying to remove the state from location so that it only has the city name. </p>
  
  <pre><code>year    location    state   success
  2009    New York, NY    NY  1
  2009    New York, NY    NY  1
  2009    Chicago, IL IL  1
  2009    New York, NY    NY  1
  2009    Boston, MA  MA  1
  2009    Long Beach, CA  CA  1
  2009    Atlanta, GA GA  1
  </code></pre>
  
  <p>I have tried the following code:</p>
  
  <pre><code>x = KS_clean.column(1)
  np.chararray.split(x, ',')
  </code></pre>
  
  <p>How can I split the string so the result only contains the city name like the following:</p>
  
  <pre><code>array('New York', 'New York', 'Chicago', ...,) 
  </code></pre>
  
  <p>so that I can put it back inside the table?</p>
  
  <p>Sorry it is basic question but I am new to python and still learning. Thanks</p>