Image by 95C from Pixabay

Using Pandas’ .loc and .isin() to Filter for a List of Values in Python

Documentation for using both .isin() and .loc to filter a Pandas Dataframe on a list of values

I use .loc on a daily basis. It’s like using the filter function on a spreadsheet.

--

--

--

Documentation and tutorials on Python, Pandas, Jupyter Notebook, and Data Analysis.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Artificial Intelligence Club AMA Recap

Reviewing online tech courses: Git, Command Line, Google Analytics

Building a Plotly Dashboard with dynamic sliders in Python

50 Python Interview Question and Answers

Creating a Datadog Dashboard Using Terraform

The Clash of Two Blocks (Part 1)

A love letter to the CSS :not() pseudo-class

Serverless Web Software with AWS — Part Two — A ToDo App — Getting the API Gateway Configured

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
David Allen

David Allen

Documentation and tutorials on Python, Pandas, Jupyter Notebook, and Data Analysis.

More from Medium

Creating a dual-axis Combo Chart in Python

How to Make Plots With Pandas

Data Types and Missing Values

Data Preparation-EDA using Pandas, Numpy, Matplotlib and Seaborn