I am trying to drop redundant rows from dataframe by checking if the value exists in specific list by using this code:
loadedAndClicked = bouncyDF[bouncyDF['source_event_id'] in clickedQueries]
and the error message is:
ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
can anyone tell me why?
Update: .isin() works!
loadedAndClicked = bouncyDF[bouncyDF['source_event_id'].isin(clickedQueries)]