Introduction to Programming in Python

Learn the fundamental concepts and syntax for your first script and data science notebook.

Introduction

In this two-day workshop, we will help you get started learning how to program in Python 3, one of the most popular languages for quick scripts, production software, and doing data science.

Through realistic examples, you’ll be introduced to various fundamental programming concepts, like variables, functions, and control flow. The workshop will be hands-on, with challenging exercises to complete. Unique about this workshop is that we’ll be using Jupyter Notebooks, a popular environment to run code interactively and do data science.

This workshop will not only prepare you for more advanced Python learning but will also provide you with a solid and reliable foundation upon which to base your data science journey.

What you’ll learn

  • Programming fundamentals, including variables, functions, and control flow
  • Python data structures such as lists, sets, and dictionaries
  • Functional programming using filter(), map(),lambda, comprehensions, and generators
  • Reading and writing text, CSV, and JSON files
  • How to handle exceptions, and how to create them
  • Executing a Python script from the command line
  • How to use Jupyter Notebooks, a modern environment for doing data science
  • An overview of the Python standard library, including modules like itertools and collections
  • Obtain data from RESTful APIs using the requests package
  • Install and use open source packages

This workshop is for you because

  • You’re a data analyst and want to start using Python for your daily work
  • You have experience with Excel or R and are curious how Python can help you
  • You’ve been using Python for a while but want a better understanding of the fundamental concepts
  • You’re a manager considering moving your team to Python

Schedule

Day 1:

  • Introduction
    • Introduction to Python 3
    • Running code interactively with JupyterLab and notebooks
    • Running Python scripts from the command line
    • Getting help
  • Variables and container data types
    • Booleans, numbers, and strings
    • Type casting
    • Storing multiple values in lists, sets, tuples, and dictionaries
    • Indexing, slicing, and dicing lists
    • Deeply nested data structures
  • Control flow
    • If statements and boolean expressions
    • Looping with for and while
    • Looping helpers such as range(), len(), and zip()
  • Functions
    • Defining a function
    • Passing arguments, default values
    • Returning single and multiple values

Day 2:

  • Modules and packages
    • Various ways to import modules
    • An overview of the Python standard library
    • Dive into the modules itertools and collections
    • Installing and using third-party packages
    • Open source packages that might be useful for your daily work
  • Files
    • Reading and writing text files
    • Formatting dynamic text with f-strings
    • Properly storing and parsing CSV and JSON
    • Handling various exceptions
  • Functional programming
    • Lambda functions
    • filter(), map(), and reduce()
    • List and dictionary comprehension
    • Creating generators with yield
    • Generator expressions
    • Processing data in a streaming manner
    • Querying RESTful APIs
  • What’s next
    • Visualisation capabilities of Python
    • Overview of the PyData ecosystem
    • Useful resources and follow-up workshops

Prerequisites

No previous experience with programming is required for this workshop.

We’re going to use Python together with JupyterLab. The recommended way to install these two is by installing the Anaconda Distribution (Python 3.7 version). Should we need any additional packages then we will install those during the workshop. More detailed installation instructions will be provided by email after signup.

About your instructor

Jeroen Janssens
Principal Instructor, Data Science Workshops

Jeroen is an RStudio Certified Instructor who enjoys visualizing data, building machine learning models, and automating things using either Python, R, or Bash. Previously, he was an assistant professor at Jheronimus Academy of Data Science and a data scientist at Elsevier in Amsterdam and various startups in New York City. He is the author of Data Science at the Command Line. Jeroen holds a PhD in machine learning from Tilburg University and an MSc in artificial intelligence from Maastricht University.

Clients

We’ve previously delivered this workshop at:

Brabant Water
Vocalink
KPN ICT Consulting
Elsevier
eHealth Africa

Photos and testimonials

Stijn de Jong
Advisor Water Supply, Brabant Water

At Brabant Water, most of us were still using spreadsheets to clean, analyse, and model our data. Thanks to Data Science Workshops, who delivered an engaging, hands-on workshop at our office, many of us have switched to Python and Jupyter Notebook, which allows our analyses to be much more advanced and reliable.

Sign up

One upcoming date:
We can also organise this hands-on workshop as an online training for your team. Learn more.