Python Pandas Tutorial: Different ways to filter Pandas DataFrame #9

preview_player
Показать описание
In this video lecture you will learn different ways to filter the data from Pandas DataFrame.

Introducing Pandas Query — Dynamic Data Filtering
What to do when the filtering criteria move too much?

Pandas has easy-to-use tools to filter your DataFrames, however the basic methods — like loc, iloc, or passing a boolean expression — lack the ability to use them comfortably when the filtering parameters are not static. The query DataFrame method offers a solution for this problem.
Data Filtering is one of the most frequent data manipulation operation. It is similar to WHERE clause in SQL or you must have used filter in MS Excel for selecting specific rows based on some conditions. In terms of speed, python has an efficient way to perform filtering and aggregation. It has an excellent package called pandas for data wrangling tasks.

You will learn:
1.) Apply filter single value.
2.) How to use Boolean value in Filter?
3.) Filter the criteria based on multiple columns.
4.) Filter the multiple cells in single column or multiple column.
5.) Understanding the logical operators in filters.
6.) How to apply nested criteria in filter?
7.) Apply the filter using ~ (tild) operator.
8.) Filter with string data.
9.) Apply the filter using isin method.
10.) How to use Lambda within the filter?
11.) Filter with Query method, nlargest, nsmallest and loc.
12.) Examples....

Рекомендации по теме
Комментарии
Автор

Thank you 😊
So to Sum up, we can filter data in pandas through:
- Boolean Mask,
- loc (and unnecessarily iloc),
- query(),
- lambda,
- isnull, and which you discussed in detail in the next video,
Thx body 🙂 🙂

mosama
Автор

hey bro thank you, you did it as ur channel name...!!

hanumantgavali
Автор

awesome content with nice explanation !! thx !!

Avdheshkumar-kdqz
Автор

Thanks Sir 😊😊 very informative session..👍👍👍👍

dss
Автор

Can u please show how to folder based on OrderDate

mycmzlc
Автор

Wow.. Very beautifully explained... Now my data filter concept is clear...

ramaisgod
Автор

Thanku sir for such kind of information that you are provinding through your vedios

vloggergargfamily
Автор

this is very nice video. Thank you so much

marvhan
Автор

In the lambda df{df.apply(lambda x :x["City"] =="Houston" and x["Category"] == "Technology", axis = 1)] how can I add one more value to Category (x["Category"] == "Technology" and "Office Supplies, axis = 1] for example?
Similar that the example that you show on excel filtering multiple values in two different columns

raymundofelipeolvera
Автор

I am facing problems to merge two dataframe will you hepe ???

chint
Автор

I have multiple conditions to validate. if ‘Country’ column has specific value and ‘Age’ column is less than 11 or ‘DOB’ column has date after 2010 or ‘Comments’ column contains few different strings from a list and create a new column that prints value ‘Valid’ if all conditions meet else prints ‘Invalid’. Need to define a function and apply to multiple data frames. I’m so lost

GrowthMindset_J
Автор

date was stored in string format in dataframe. I am struggling on Converting string to date and filtering

visasimbu
Автор

Where are the sample files you use in your examples?

vimalchawla
Автор

>700 and <900 will not select 700 and 900; condition should be >=

vimalchawla
Автор

Very informative and too much information in one video, keep posting videos

jitendratrivedi