There are numerous functions in Python and its library ecosystem. However, as a data scientist, you will often need to write your own functions to solve problems arising from your data analysis tasks. This first Python Data Science Toolbox course will equip you with skills to dive into the art of function writing. This will involve writing your very own custom functions, complete with multiple parameters and multiple return values, along with default arguments and variable-length arguments. You will gather insight into scoping in Python and write lambda functions and handle errors in your function writing practice. To wrap up each topic, you will practice using the skills by writing functions that analyze example data frames.
- Writing your own functions
In this topic, you’ll learn how to write simple functions, as well as functions that accept multiple arguments and return multiple values. You’ll also have the opportunity to apply these new skills to questions commonly encountered by data scientists.
- Default arguments, variable-length arguments and scope
In this topic, you’ll learn to write functions with default arguments so that the user doesn’t always need to specify them, and variable-length arguments so they can pass an arbitrary number of arguments on to your functions. You’ll also learn about the essential concept of scope.
- Lambda functions and error-handling
Learn about lambda functions, which allow you to write functions quickly and on the fly. You’ll also practice handling errors in your functions, which is an essential skill. Then, apply your new skills to answer data science questions.