I was trying to drop the rows with id equals anything in the ND_Before0_Opioid.id.unique()
list with the following code:
ND = data[~data.id.isin([ND_Before0_Opioid.id.unique()])]
But nothing was changed, ND is still exactly the same with original data