So I have a specific problem that needs to be solved. I need to DELETE elements present in one pandas series (ser1) that are common to another pandas series (ser2).
I have tried a bunch of things that do not work and the closest thing I was able to find was with arrays using np.intersect1d() function. This works to find common values, but when I try to drop indexes that are equal to these values, i get a bunch of mistakes.
I've tried a bunch of other things that did not really work and have been at it for 3 hours now so about to give up.
here are the two series:
ser1 = pd.Series([1, 2, 3, 4, 5])
ser2 = pd.Series([4, 5, 6, 7, 8])
The result should be:
print(ser1)
0 1
1 2
2 3
I am sure there is a simple solution.