Filtering Pandas Dataframe With Single Or Multiple Conditional Operators Like IsIn, Not Equals to

preview_player
Показать описание
Filtering Pandas Dataframe - 2 | Filtering Pandas Dataframe With Single Or Multiple Conditional Operators Like IsIn, Not Equals to, Greater Than Equals to

Like we covered in the previous video how to filter the data or slice/dice the dataframe using loc vs iloc, this video is in continuation of same series and here we will see how to select or filter the data in a DataFrame using conditional operators like IsIn, Not Equals to, Less Than Equals to etc.

In this video we have covered:

00:00 - Introduction
01:04 - Using logical operator to filter the data in a dataframe
01:53 - What are the logical operators used to filter the data in a pandas dataframe (e.g. equals to, not equals to, greater than, less than, less than equals to etc.)
07:40 - Using multiple logical operators to filter the data in a DataFrame.Using and condition with multiple logical conditions or operators to filter the data
12:19 - Using multiple logical operators to filter the data in a DataFrame. Using or condition with multiple logical conditions or operators to filter the data
17:04 - Using in to filter the data in pandas DataFrame. Look for the multiple items in a column in pandas dataframe to filter the data. Using IsIn to filter the data
23:41 - To be covered in the next videos

You can download the data, used in this video, in excel format from GitHub using below link:

You can watch the previous video on loc vs iloc, using below link

#Learnerea #Python #Pandas #FilteringDataFrame #UsingConditionalOperators #Pythonforbeginners #PythonProgramming #ExploratoryDataAnalysisUsingPandas
Рекомендации по теме
Комментарии
Автор

What if you have 3 list?
I want to do something like this. the data was taken with webscrapping, so i have 3 lists. I have a column of 1 type of fruit, another column of price and another of price per kg. I would like it to only write or save to a new array, list or dictionary if the fruit (with its price1 and price per kg) includes a specific word, for example fruit in 'box' or 'bulk'. do you know how i can do it? Its not equal a word as in the video, its if it has a word included. Example:
Fruit in a box 600gr 10(usd) 5(usd)
Fruit bulk 900gr 11(usd) 6(usd)
But if its 'fruit shampoo' dont be writen or save in excel column (it has not the word box or bulk).... or at least could be written and the deleted that row somehow

tigreonice
Автор

thanks for the video. What about if you need to check two columns and if the value of the list isin either one?

aliebrahimi