JSM 2026 · Continuing Education Course

Python for R Users

An introduction to Python for statisticians and data scientists who already work in R. The focus is on where the two languages differ, the pitfalls R users tend to hit, and the core Python data-science libraries, with each concept related back to its R equivalent.

Mon, Aug 3, 2026 1:00-5:00 PM
No Python needed Comfortable in R
Approach

Learn Python by way of R

The workshop assumes you're already comfortable in R, so it doesn't start from scratch. Each concept is introduced alongside its R equivalent, keeping the focus on what actually differs in Python rather than on the fundamentals of data analysis.

Built on what you know

Every idea is shown side by side with its R or tidyverse counterpart, from vectors to group_by.

Common pitfalls

0-based indexing, 2**3 vs 2^3, copy-vs-reference, and mutable defaults: the differences that most often catch R users.

Core libraries

NumPy, pandas, Matplotlib, seaborn, StatsModels, and scikit-learn, the main libraries for data analysis in Python.

Hands-on throughout

Code along in JupyterLab or Colab using the workshop notebooks, with full solutions provided.

Curriculum

What we'll cover

The material runs from the language fundamentals through the data-science workflow, split roughly evenly across the two sessions.

Session 1

Python fundamentals & NumPy

The language itself, then array computing.

  • 01Basic syntaxOperators, strings, and import statements
  • 02Data structuresLists, tuples, and dictionaries
  • 03Control flow & functionsLoops, list comprehensions, conditionals
  • 04NumPyArrays, vectorized ops, boolean indexing, random numbers
  • 05MatplotlibFigures, axes, and the plotting basics
Session 2

The data-science stack

From wrangling to modeling and prediction.

  • 01pandasSelecting, filtering, GroupBy, joins, method chaining, missing data
  • 02seabornStatistical graphics: displot, relplot, catplot
  • 03StatsModels & SciPyRegression, distributions, and hypothesis tests
  • 04scikit-learnThe fit / predict / score machine-learning workflow
  • 05OOP & duck typingClasses, dunder methods, and Pythonic idioms
Materials

Workshop materials

Slides, both hands-on notebooks with solutions, and a printable R to Python cheat sheet. Open the notebooks in Colab for zero setup, or view them on GitHub. To work on your own computer, download everything in one file.

Download everything (ZIP)

Course slides

The full deck presented across both sessions.

Concept overviews for each topic, shown ahead of the live-coding portions.

R to Python cheat sheet

Ten sections of side-by-side R and Python syntax for quick reference.

Syntax & operators, data types and structures, control flow, functions, NumPy, pandas vs dplyr, Matplotlib & seaborn vs base R and ggplot2, statistical modeling, and the classic Python pitfalls for R users.

Session 1 notebook

Python fundamentals, NumPy & Matplotlib.

The hands-on notebook we work through together. Solutions in a separate file.

Session 2 notebook

pandas, seaborn, StatsModels & scikit-learn.

The second hands-on notebook, covering the full data-science stack.

Before the workshop

Two things to do beforehand

Doing these ahead of time means we can start on the material right away.

1Take the background survey

A short survey on your background and what you'd like to get out of the day. It helps me set the pace and choose relevant examples. Please complete it when you have a moment.

If you cannot reach Google Forms, you can email me your answers instead.

2Set up your environment

Option A: Google Colab Zero install

Nothing to install. From the Materials section, click Open in Colab on either notebook and start coding in your browser. A free Google account is all you need.

Option B: Run on your own computer JupyterLab

No typing required. Download one file, unzip it, and double-click the launcher for your computer. It installs Python and everything else for you.

  1. Download the materials.
    Download everything (ZIP)
  2. Unzip it. On Windows, right-click the downloaded file and choose Extract All (please don't skip this step). On a Mac, double-click it.
  3. Open the new python4r-main folder and double-click the launcher:
    • Windows: START-HERE-Windows.bat
    • Mac: START-HERE-Mac.command
  4. The first time only, your computer may ask permission before running it:
    • Mac: if it is blocked, control-click (or right-click) the file, choose Open, then click Open in the dialog. If there is no Open button, go to System Settings > Privacy & Security and click Open Anyway.
    • Windows: if you see "Windows protected your PC", click More info, then Run anyway.

That is all. The first run downloads Python and the course packages, so give it 5 to 10 minutes and leave the window open. JupyterLab then opens in your browser. Whenever you want to work on the material again, just double-click the same file.

Prefer the command line?

Install uv and git, then:

# clone the workshop repo
git clone https://github.com/emeyers/python4r.git
cd python4r

# install everything from pyproject.toml + uv.lock
uv sync

# launch JupyterLab
uv run jupyter lab
If you run into any trouble with the survey or the setup, feel free to email me beforehand and we can sort it out.
Your instructor

Who's teaching

Ethan Meyers

Ethan Meyers

Workshop instructor · JSM 2026 Continuing Education

Ethan created the workshop material. Feel free to get in touch before the workshop with any setup questions, or with topics you'd like to see covered.