M04 Functions
DS 5100: Programming for Data Science
Welcome
Introduction
Video Gallery
M01 Getting Started
About Rivanna
Using Unix
SSH for GitHub
Git and GitHub
M02 Introducing Python
Data and Code
Python Object Types
NB: Data Types, Operators, and Expressions
NB: Numbers
NB: Booleans
NB: Strings
NB: Data Structures
NB: Aside On Immutables
M03 Control Structures
Values, Variables, Expressions, and Statements
NB: Control Structures
NB: Iterables and Iterators
NB: Comprehensions
NB: Nested Comprehensions
M04 Functions
NB: Introduction to Functions
NB: Importing Functions
NB: Lambda Functions
NB: Recursion
NB: Scope
NB: Function Groups
M05 NumPy
NB: Python Timing
NB: Basic File I/O
NB: Introducing NumPy
NB: NumPy Indexing
NB: NumPy Operations
NB: NumPy Functions
M06 Pandas
NB: Introducting Pandas
NB: Exploring Pandas
NB: Deeper Into Pandas
NB: Narrow vs Wide Tables
NB: Method Chaining
NB: Pandas and SQL
M07 Classes
What is OOP?
NB: Introducing Classes
NB: From Functions to Classes
NB: More About Classes
NB: Understanding Class Attributes
NB: Putting Your Class in a File
M08 Testing
Testing and Verification
NB: Exception Handling
NB: Unit Testing with Unittest
M09 Modules
NB: Modules and Packages
NB: Namespaces and Paths
NB: User-Created Packages
M10 Basic R
NB: Introducing R
NB: R Data Types and Operators
NB: R Data Structures
NB: R Data Frames
NB: R Control Structures
NB: R Functions
M11 Dplyr
NB: The Tidyverse and Tibbles
NB: Dplyr
M12 Visualization
GGPlot and the Grammar of Graphics
NB: Getting Started with GGPlot2
NB R Markdown
NB: Plotly and GGPlotly
NB: GGPlot in Python with Plotnine
M13 Agile
Project Management
Agile Development
User Stories
Activities
Activity: Using Rivanna
Activity: Using Git and GitHub
Activity: Hello, World!
Activity: Jupyter Lab
Appendices
Setting Up O’Reilly
Table of contents
Topics
Readings
Suggested
Optional
Edit this page
M04 Functions
Topics
Built-in functions
User-defined functions
Variable scope
Lambda functions
Design of functions
Recursion
Readings
Suggested
Lutz 2019, Part IV, Chapter 16: Function Basics
Lutz 2019, Part IV, Chapter 17: Scopes
Non-local is for advanced users.
Lutz 2019, Part IV, Chapter 18. Arguments
Lutz 2019, Part IV, Chapter 19: Advanced Function Topics
Optional
McKinney, 2023, Python for Data Analysis, “3.2: Functions”
Functions (W3S)
Global and Local Variables (GFG)
Lambda Functions (Real Python)
NB: Nested Comprehensions
NB: Introduction to Functions