I have a column in pandas full of sentences. In each of those sentences, I'm trying to remove part of a sentence after a word "in". Example:

Current form: "Mary has a lot of furniture inside her house, where she lives with her parents and her boyfriend in Maryland"

Desired form: "Mary has a lot of furniture inside her house, where she lives with her parents and her boyfriend"

I have tried multiple solutions, however in each case the sentence gets separated after any instance of a string "in", even when it's inside a word. So currently, my output is this: "Mary has a lot of furniture". That's because the word inside contains the string "in"

This is what I currently have and its not producing a desired output:

```
 df['split'] = df.sentences.apply(lambda x: "in".join(x.split("in", 1)[:1]))

```

Any help would be greatly appreciated!