Skip to main content

BANA 4080: Introduction to Data Mining with Python

Author

Brad Boehmke

Published

September 15, 2026

Welcome

Welcome to BANA 4080: Introduction to Data Mining with Python — a 14-week undergraduate course that takes you from writing your first line of Python through building and evaluating machine learning models on real data.

What this course is about

Most data does not arrive ready to use. Before anyone can model it, chart it, or make a decision with it, someone has to import it, clean it, reshape it, and understand what is actually in it. This course teaches you to do that work in Python — and then to go further, using those same skills to build models that predict and discover.

The first half builds the foundation: Python itself, then pandas for wrangling, then visualization and exploratory analysis. The second half applies it, moving through regression, classification, tree-based models, and unsupervised learning, and closing with a look at where the field goes next.

By the end of BANA 4080, you will:

  • Set up a Python environment and write code with confidence, starting from no prior experience
  • Import data from CSV, Excel, and the web, and inspect what you have
  • Filter, sort, clean, aggregate, and join data with pandas
  • Build visualizations and conduct exploratory data analysis as a systematic workflow
  • Write functions, loops, and control flow to make your code reusable
  • Frame a business problem as a machine learning problem, and split data honestly
  • Build and evaluate regression and classification models, and know which metric to trust
  • Apply cross-validation, hyperparameter tuning, and feature engineering
  • Discover structure in unlabeled data with clustering and dimension reduction
  • Recognize where modern methods — gradient boosting, deep learning, generative AI — fit in

Who this book is for

This book is written for upper-level undergraduates who may have little or no prior programming experience but want to work with data seriously. It also suits early-career professionals and students in analytics, business, or other quantitative fields who are learning Python for the first time or want a firmer grasp of how to explore, visualize, and model data. Everything is hands-on and builds step by step — no prior Python assumed.

How this book is structured

The book is organized into 14 modules, each aligned with one week of instruction. Module number and week number are always the same, so Module 5 is Week 5.

Module Topics Chapters
1 Getting started 1 – 3
2 Python data science ecosystem 4 – 6
3 DataFrames & importing data 7 – 9
4 Data manipulation 10 – 12
5 Data visualization & EDA 13 – 15
6 Creating efficient code 16 – 18
7 Midterm project
8 Introduction to machine learning 19 – 20
9 Regression 21 – 22
10 Classification 23 – 24
11 Tree-based models & feature importance 25 – 27
12 Model optimization & validation 28 – 30
13 Unsupervised learning 31 – 32
14 Modern ML & your learning roadmap 33 – 34

Each chapter includes:

  • Conceptual explanations of the topic
  • Worked Python examples you can run in Jupyter or Google Colab
  • Your Turn exercises to check your understanding

The midterm project

Module 7 is given over to a midterm project built around the Complete Journey retail dataset — real, multi-table transaction data from a grocery retailer tracking household purchases over time. Working in teams, you will define a business question about a growth opportunity, join and prepare the data to answer it, and present findings to a business audience.

Everything from the first six modules feeds into it: importing, cleaning, joining, aggregating, and visualizing. You will start shaping your question well before Week 7 — the Week 5 lab is where project proposals are drafted.

Resources

Every module has a landing page listing all the content for that week. Module 1, for example, includes:

  • Lecture slides — the Reveal.js deck for the week
  • Chapter notebooks — Colab-ready notebooks paired with each chapter’s code
  • Lab notebook — the Thursday lab assignment
  • Cheat sheet — a quick reference for the module’s key concepts and syntax

Every module follows this same structure. Start at the module landing page and work through the resources in order.

Conventions used in this book

The following typographical conventions are used throughout:

  • strong italic: indicates new terms,
  • bold: indicates package & file names,
  • inline code: monospaced highlighted text indicates functions or other commands that could be typed literally by the user,
  • code chunk: indicates commands or other text that could be typed literally by the user
1 + 2
3

You will also see these callouts:

Signifies a tip or suggestion

Signifies a general note

Signifies a warning or caution

Software used throughout this book

This book is built on the open-source Python data science ecosystem. The examples are written for Python 3.x, currently using…

Code
# Display the Python version
import sys
print("Python version:", sys.version.split()[0])
Python version: 3.12.14

…and run inside Jupyter Notebooks, which give you an interactive, beginner-friendly environment for writing and running code.

The core libraries are:

  • pandas and numpy for data wrangling and numerical computing,
  • matplotlib, seaborn, and bokeh for data visualization,
  • scikit-learn for machine learning, and
  • xgboost and tensorflow/keras in the final module, where we look at gradient boosting and neural networks.

Generative AI and large language models are covered conceptually rather than through code — Chapters 19, 33, and 34 explain where they fit and what to learn next.

Each module introduces the libraries it needs, explains how and why they are used, and provides reproducible code so you can generate the same results yourself.

Running the companion notebooks

Most chapters have a companion Jupyter notebook with hands-on examples. You can run these two ways:

  1. Google Colab (recommended): click the “Open in Colab” badge at the top of any notebook to run it in your browser. Dependencies are pre-installed, so you can start immediately with no setup.

  2. Locally: you will need Python 3.12 or greater. Download requirements.txt and run:

    pip install -r requirements.txt

    This covers the data wrangling, visualization, and machine learning examples. The deep learning notebook in Module 14 additionally needs TensorFlow, which is easiest to run in Colab.

If you are new to Python or need help setting up, Chapter 2 walks through Google Colab, Anaconda, and Visual Studio Code.

Getting help

For questions about grading, logistics, or course policies, contact the course instructor directly. Canvas holds the authoritative versions of the syllabus, deadlines, and assignment rubrics.