Skip to Content
Foundational Python for Data Science
book

Foundational Python for Data Science

by Kennedy Behrman
September 2021
Beginner to intermediate
256 pages
6h 48m
English
Addison-Wesley Professional
Content preview from Foundational Python for Data Science

6

Functions

In our lust for measurement, we frequently measure that which we can rather than that which we wish to measure…and forget that there is a difference.

George Udny Yule

In This Chapter

The last and perhaps most powerful compound statement that we discuss is the function. Functions give you a way to name a code block wrapped as an object. That code can then be invoked by use of that name, allowing the same code to be called multiple times and in multiple places.

Defining Functions

A function definition defines a function object, which wraps the executable block. The definition does not run the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Interpretable Machine Learning with Python

Interpretable Machine Learning with Python

Serg Masís
Data Science Bookcamp

Data Science Bookcamp

Leonard Apeltsin

Publisher Resources

ISBN: 9780136624417