Let's say I have following dataframe:
a = [[1,2,3,4,5,6],[23,23,212,223,1,12]]
b = [1,1]
df = pd.DataFrame(zip(a,b), columns = ['a', 'b'])
And my goal is to remove the elements in the lists in series A that are in series B. My attempt at doing so is below:
df['a'] = [i.remove(j) for i,j in zip(df.a, df.b)]
The logic seems sounds to me however I'm ending up with df['a'] being a series of nulls. What is going on here?