Answers for "how to put multiple contion whilie filtering a pandas df"

5

pandas two conditions filter

# when you wrap conditions in parantheses, you give order
# you do those in brackets first before 'and'
# AND
movies[(movies.duration >= 200) & (movies.genre == 'Drama')]
Posted by: Guest on March-21-2020

Code answers related to "how to put multiple contion whilie filtering a pandas df"

Python Answers by Framework

Browse Popular Code Answers by Language