Learn Data Science with Python - Part 3: Functions, Iterators & Generators | Tony Staunton | Skillshare

Learn Data Science with Python - Part 3: Functions, Iterators & Generators

Tony Staunton, Reading, writing and teaching.

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
11 Lessons (1h 17m)
    • 1. Class Introduction

    • 2. How to get the most from this class: Skillshare 101

    • 3. Class Frequently Asked Questions

    • 4. How to set-up your development environment

    • 5. Jupyter Notebook Introduction

    • 6. Python Functions

    • 7. Default arguments, variable-length arguments & scope

    • 8. Lambda functions & error-handling

    • 9. Python Iterators

    • 10. List comprehensions & generators

    • 11. Practice Lesson

12 students are watching this class

About This Class


Welcome to this class where you are going to learn how to take your data science skills to the next level and develop a deeper understanding of the Python programming language.

This class kicks off with Python Functions. Being a Data Scientist means that you will be constantly writing your own functions to solve problems with data. Function writing is part science part art form and you will learn both in the first lesson.

You'll start by learning how to write simple functions, then move on to writing functions that accept multiple arguments and return multiple values. Throughout the lesson, you’ll learn how to apply your new skills to various data science scenarios.

In lesson 2, you'll learn to write functions with default arguments, which means the user won’t always need to specify them, and variable-length arguments, so that they can pass to your functions an arbitrary number of arguments. As a data scientist, these are both incredibly useful tools.

Lesson 3 teaches you Lambda functions which allow you to write functions quickly and on-the-go. You'll also learn how to handle errors that your functions will generate from time-to-time throw.

You’ve worked with iterators before when you learned how to write **for loops**. In this lesson, you’ll go deeper. You’ll look at how iterators can help you deal with large amounts of data - in this case, a large set of employee data that you will learn how to load in chunks using iterators helping to save computer memory.

Using what you learned in lesson 3 you'll build on your knowledge of iterators and learn about list comprehensions, which allow you to create complicated lists and lists of lists in one line of code.

List comprehensions can dramatically simplify your code and make it more efficient and will become a vital part of your data science skillset. You'll also learn about generators, which are extremely helpful when working with large sequences of data that you may not want to store in memory but instead generate on the fly.

We close this class with a practice lesson which will give you the opportunity to practice your newly learned data science skills. This lesson is done at your own pace so you'll have the chance to write your own functions and list comprehensions as you work with iterators and generators and take your data science skills to the next lesson.

Each lesson in this class is created using Jupyter Notebooks which means that you can download the Python code, experiment and improve upon it. You also get to keep the class notes for future learning and reference.

At the end, of the lesson is a final project to apply what you've learned.

What are you waiting for? Enroll now and take the next step!