title: (Python, Pandas) - How do I get everything to the left of a certain character?
body: <p>I have a column, <code>market_area</code> that I want to abbreviate by keeping only the part of the string to the left of the hyphen. </p>
  
  <p>For example, my data is like this:</p>
  
  <pre><code>import pandas as pd
  tmp = pd.DataFrame({'market_area': ['San Francisco-Oakland-San Jose',
                                      None, 
                                      'Dallas-Fort Worth', 
                                      'Los Angeles-Riverside-Orange County'],
                      'val': [1,2,3,4]})
  </code></pre>
  
  <p>My desired output would be: </p>
  
  <pre><code>['San Francisco', None, 'Dallas', 'Los Angeles']
  </code></pre>
  
  <p>I am able to split based on the hyphen:</p>
  
  <pre><code>tmp['market_area'].str.split('-')
  </code></pre>
  
  <p>But how do I extract only the part to the left of the hyphen?</p>