Created
August 13, 2020 22:51
-
-
Save janbenetka/fd7282db973b2afbf0607ec79587a41f to your computer and use it in GitHub Desktop.
[Query with list comparison ala .isin()] #pandas #query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df.query('a in ["a", "b", "c"]') | |
id_list = ["a", "b", "c"] | |
df.query('a in @id_list') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment