I have a Dataframe below:
data = {'Name':['Trump', 'Donald Trump', 'Melania Trump', 'Mike Pence'], 'number':[20, 21, 19, 18]}
I would like to remove a row if the string in Name on that row is found as part of another row with a leading space, i.e. Trump is found in Donald Trump (it matches Trump), and thus it remove the row with Trump.
What it is the most optimised way of doing this?
Expected output is rows 1, 2, 3 (i.e. only first row with 'Trump' is removed)