2
On pandas, when I want to filter one DataFrame
based on a list of values, I:
valores=[15,17,22]
df=df[[k in valores for k in df.mpg]]
In SQL I know I can get the same result with the following code:
SELECT * FROM 'dataset.table1'
WHERE mpg=15
OR mpg=17
OR mpg=22
The problem with this method is that if the list of values is too large I need to write OR
hundreds or even thousands of times.
There is a more succinct way to do this query in SQL using a list as in pandas?
P.S.: In the example of pandas I used the example dataset auto.csv