title: Remove string after character python
body: <p>I have the following DataFrame</p>
  <pre><code>domains :
  
    name                             path
  1   Client                      \Sales\Client
  2   Product Description         \Product Information Management\Product Description
  </code></pre>
  <p>I would like to be able to clean the column path to have only the first element Sales for the first row and Product Information Management for the second.</p>
  <p>I have tried the following code :</p>
  <pre><code>domains=re.sub(r'\\\.*',&quot; &quot;,domains['path'])
  </code></pre>
  <p>but it does not worked. Can someone provide me the right way to do that.</p>