Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pandas filter on two columns

df[(df['favorite_color'] == 'green') & (df['grade'] > 90)]
Comment

 Filter the data using multiple columns 

df[(df['Airline'] == 'US') & (df['AirportFrom'] == 'PHX') & (df['DayOfWeek'] == 1)]
Comment

PREVIOUS NEXT
Code Example
Python :: how to remove element from nested list in python 
Python :: python elementtree load from string 
Python :: python - extract the price from a string 
Python :: balancing paranthesis python 
Python :: gaierror at /members/register [Errno 11001] getaddrinfo failed 
Python :: how to get current google tab in python 
Python :: python list files in directory 
Python :: django forms error customize 
Python :: Add Cog to bot in Discord.py 
Python :: type python 
Python :: opening files in python 
Python :: draw bounding box matplotlib 
Python :: how to get timezone in python 
Python :: python delete dictionary key 
Python :: Check and Install appropriate ChromeDriver Version for Selenium Using Python 
Python :: download unsplash images code 
Python :: django forms date picker 
Python :: how to make a bill in python 
Python :: pairwise function python 
Python :: python append to list 
Python :: if statement in python 
Python :: django redirect 
Python :: download pdf python 
Python :: xlsb file in pandas 
Python :: How can you hide a tkinter window 
Python :: check if item exists in list python 
Python :: seaborn green color palette python 
Python :: file storage django 
Python :: python is instance 
Python :: permutation of a string in python 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =