Introduction to Python

Introduction to Python icon

Introduction to Python

About This Course

Python is a general-purpose language with an unusually good set of libraries for working with data. Over two days you go from the core language to an analysis someone else can use, on the same laptop and in the same tools you will keep using afterwards.

Day one is the language itself, taught through examples rather than syntax tables. You work in Jupyter for exploration and Visual Studio Code for code you intend to keep, and you cover the parts of Python that turn up in almost every script: the core data types, functions, files and paths, and the standard library. A worked example pulls live data from a web API, which is where most people first meet the fact that real inputs are not always what the documentation promised.

Day two is data. You read from the systems the data already sits in — CSV exports, Excel workbooks with several sheets, SQL databases — and then clean, join and summarise it in Pandas. We spend time on the parts that are fiddly in practice rather than in tutorials: dates that arrive as strings in three different formats, two datasets that have to be reconciled before either is useful, and a script that needs to fail with a clear message rather than a plausible wrong number. The day ends with the output: interactive charts in Plotly Express, a report that regenerates itself, and a Streamlit dashboard your colleagues can open in a browser.

Every topic mixes short instruction with exercises, and you write code in every section.

Who This Course Is For

Analysts, engineers, scientists, and finance and operations staff who have reached the limits of doing the work in a spreadsheet. It suits people whose monthly figures involve exporting the same files, pasting them into the same workbook and rebuilding the same chart, and who want that job written down once instead. Developers coming from another language will find it a fast route into Python's idioms and its data ecosystem.

It also suits teams where the data already lives in databases, Excel workbooks and web APIs, and where the analysis on top of it is currently spread across individual desktops. Everyone finishes with the same working vocabulary — Pandas for the data, Plotly Express for the charts, Streamlit for anything colleagues need to open themselves.

Prerequisites

Some familiarity with programming concepts in any language is helpful, but prior programming experience is not required. You do not need to have written Python before.

You do not need to install anything beforehand; the course sets up your Python environment on the first morning. Bring a laptop. You are welcome to bring your own data sets, or anonymised subsets of them, and work on them during the exercises.

What You'll Learn

  • Write and run Python scripts using functions, the core data types and the standard library.
  • Read and write the formats your data already sits in: CSV, Excel workbooks, SQL databases and JSON from a web API.
  • Handle exceptions so a script that fails does so with a clear message rather than a wrong answer.
  • Clean, join and summarise tabular data in Pandas, including dates and time series.
  • Chart a result as an interactive Plotly Express figure that answers a specific question.
  • Build a Streamlit dashboard that colleagues can open and drive themselves.

Course Syllabus

Day 1 — Python basics

  • Why Python, and what it is used for
  • Working in Jupyter and VS Code
  • The core Python language: variables, conditions, loops and functions
  • Essential data types: strings, lists, dicts, tuples and sets
  • Modules, packages and the standard library
  • Working with files and paths
  • Worked example: fetching data from a web API
  • Raising and handling exceptions

Day 2 — Handling, analysing and presenting data

  • Reading and writing CSV, Excel, JSON and SQL databases
  • Indexing and selecting data in Pandas
  • Dates, times and time series
  • Joining and merging datasets
  • Summarising with group-by operations and pivot tables
  • Statistical graphics with Plotly Express
  • Worked example: creating automated reports
  • Interactive dashboards with Streamlit