Skip to content

Instantly share code, notes, and snippets.

@aswad32
Created December 20, 2016 23:29
Show Gist options
  • Save aswad32/b580ef0311878c7bf710c835bba4f35b to your computer and use it in GitHub Desktop.
Save aswad32/b580ef0311878c7bf710c835bba4f35b to your computer and use it in GitHub Desktop.
Python pandas dataframe isin and reverse isin
#isin
df.loc[df['kod'].isin([1,4])]
#reverse isin
df.loc[~df['kod'].isin([2,3])]
@Inabat13
Copy link

Inabat13 commented Aug 8, 2021

thank you!

@MaiRodrigues
Copy link

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment