I am trying to filter a dataframe as:
a= a[~(b['var1'].isin(c['var2']))]
but get the following error:
"Unalignable boolean Series provided as "
pandas.core.indexing.IndexingError: Unalignable boolean Series provided as indexer (index of the boolean Series and of the indexed object do not match).
I understand that the statement:
print(~(b['var1'].isin(c['var2'])) [:10])
is returning a series that is boolean masked which may not be acceptable. So, I tried to use loc as:
a= a.loc[:, ~(b['var1'].isin(c['var2']))]
but I am getting the same error. What am I missing here? Any input would be appreciated.
Thanks