In this lesson, you’ll see why you’d want to use the filter() function rather than, for example, a for loop with an if statement. You’d get the same result, but functional programming allows you to chain function calls. This allows you to avoid side effects and have a line of code that gives you a quick snapshot of what is happening.
When doing functional programming, you have a bunch of functions as your basic building blocks, and then you can use and reuse them together in different contexts.
Dan Bader RP Team on March 23, 2020
IMO the main benefits of using Pandas (which is built on top of NumPy) over a homegrown solution are: