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)

3:13

1:39

0:54

5:08

4:27

12:34

19:23

8:55

12:25

6:22
• ### 11. Practice Lesson

1:38
• --
• Beginner level
• Intermediate level
• All levels
• Beg/Int level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

257

Students

1

Project

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!

Teacher

## Class Ratings

Expectations Met?
• Exceeded!
0%
• Yes
0%
• Somewhat
0%
• Not really
0%
##### Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

# Your creative journey starts here.

• Supportive online creative community
• Learn offline with Skillshareâ€™s app

## Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects