How do I apply multiple filter criteria to a pandas DataFrame?
Let’s say that you want to filter the rows of a DataFrame by multiple conditions. In this video, I’ll demonstrate how to do this using two different logical operators. I’ll also explain the special rules in pandas for combining filter criteria, and end with a trick for simplifying chained conditions!
SUBSCRIBE to learn data science with Python:
JOIN the “Data School Insiders” community and receive exclusive rewards:
== RESOURCES ==
GitHub repository for the series: https://github.com/justmarkham/pandas-videos
“isin” documentation: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.isin.html
== LET’S CONNECT! ==