...

/

Optimized Data Filtering

Optimized Data Filtering

In this lesson, we show how to choose the method to select data.

We'll cover the following...

pandas provides extensive methods for data selection. You can find the corresponding lesson in Select data from DataFrame. Below are some alternative methods you could choose,

  • Pass condition expression to [] operation.
  • Use the query() function.
  • Use the eval() function.

Performance comparison

When the data size is small, it doesn’t matter which one you choose, but the [] operation may be faster. If the ...