Filtering functions

Function purpose

Remember why we write functions. To encapsulate a chunk of code somewhere else, to simplify a main program and/or to make it reusable elsewhere.

We can use this to our benefit for data cleaning or other data correction needs. Maybe we need to use this function regularly in our use of this data, so keeping it handy in a function can speed up out work. Or maybe the code needed for this is pretty complex and would add a ton of length/noise to our main program.

Input/output

Placing the function in your code

Last updated