title: Search for specific keyword in pandas and then edit the cell
body: <p>I am trying to edit my pandas dataframe based on some specifications. I need a certain layout of my cells in order for my program to work. Currently, my data looks something like this:</p>
  <pre><code>    x      y
  A   1  information
  B   2  information and some stuff
  C   3  information and random stuff
  </code></pre>
  <p>But I need it to look like this:</p>
  <pre><code>    x      y
  A   1  information
  B   2  information
  C   3  information
  </code></pre>
  <p>So basically, it needs to scan through every cell and if check for a keyword (&quot;and&quot; in my example). Then it needs to delete everything after the keyword, including the keyword, leaving only the important information behind.</p>
  <p>I currently just can't wrap my head around an efficient way to do this. Any help is appreciated</p>