I want to remove rows which contains "True" in the column "aff".
Expected result : Wikipedia.org raw (line) is removed
My csv:
website;aff;cond;ger;azs
wikipedia.org;True;False;False;True
youtube.com;False;False;False;False
amazon.es;False;False;False;False
My code:
check = pd.read_csv(os.path.join(path2, "my.csv"), sep=";")
output = output.merge(check, on=["Domain"], how="left")
output = output.loc[~(output["aff"] == "True")].reset_index(drop=True)
Print of output gives:
Domain aff cond ger azs
wikipedia.org True False False True
youtube.com False False False False
amazon.es False False False False
Print of output["aff"] gives:
0 True
1 False
2 False
3 False