From the course: Python for Marketing (2019)

Unlock this course with a free trial

Join today to access over 22,700 courses taught by industry experts.

Filtering data

Filtering data

- Lets quickly talk about filtering. Filtering is relatively straightforward and logical provided that you know the correct basic operators. These are examples of operators. So this is equal to or greater than and this is equal to or less than. If you can understand those or remember those or just Google those whenever you need them, you'll be able to filter data quite easily in pandas. Here's some examples of filtering data. So, let's look at the same data frame that goes out on (mumbles) Google Analytics data frame. We're looking in the column clicks for any values over 100. So, in this case, we only have one page, which has over 100 clicks. So we looked into clicks, we looked in here and we said give us out any pages or any data at all which clicks is over 100 and this is what we got instead. Now if we want to mix two values what we do is, it's the same sort of logic but we need to add an and or an or depending on…

Contents