i have a Dataframe with multiple columns like
df3=pd.DataFrame({"FACHEXPERTISE":["AQ01","AQ03","AQ05"],"ZUSATZBEZEICHNUNG":["ZF14","ZF45","ZF13"]})
and a second Dataframe which contains all possible combinations:
QUALI=pd.DataFrame({"FACHEXPERTISE":["AQ01","AQ01","AQ01"],"ZUSATZBEZEICHNUNG":["ZF15","ZF30","ZF40"]})
Now i want to check if all combinations in my df1 are valid and if not i want to delete the row.
The only way i could think of was something like this, but i always get an error that my str object does not have a .isin function:
df3.FACHEXPERTISE.apply(lambda x: x.isin(QUALI[QUALI.FACHEXPERTISE==x].ZUSATZBEZEICHNUNG))
could someone suggest another way?
Thanks in advanced