I have a data frame where I do some string replacing for example:
df1["Restriction"] = df1["Restriction"].str.replace("vs", "&")
which results in something like this:
Restriction
Montreal & Vancouver
Montreal &
What I would like to do is remove the & if it is not followed by another string so it would result in the following:
Restriction
Montreal & Vancouver
Montreal
I thought about slicing the last characters but then that would slice for everything.