How to Learn to Code – Python for Data Science

Welcome 👋

This site hosts the UNC How to Learn to Code Python curriculum.
Read lessons here, run small code snippets live in your browser, or launch the full notebook in Google Colab with one click.


Lessons

# Topic Website page Open in Colab
0 Introduction to Programming & Python Lesson 0 https://colab.research.google.com/github/How-to-Learn-to-Code/python-class/blob/master/Lesson_0_Introduction/Lesson_0_Student_Version.ipynb
1 Operators and Data Types Lesson 1 https://colab.research.google.com/github/How-to-Learn-to-Code/python-class/blob/master/Lesson_1_Basics/Lesson_1_Student_Version.ipynb
2 Iterables, Modules & Libraries Lesson 2 https://colab.research.google.com/github/How-to-Learn-to-Code/python-class/blob/master/Lesson_2_Control_Structs/Lesson_2_Control_structs_student.ipynb
3 Abstraction & Functions Lesson 3 https://colab.research.google.com/github/How-to-Learn-to-Code/python-class/blob/master/Lesson_3_Abstraction_Functions/functions_student.ipynb
4 File I/O & Pandas I Lesson 4 https://colab.research.google.com/github/How-to-Learn-to-Code/python-class/blob/master/Lesson_4_FileIO/Lesson_4_student.ipynb
5 Pandas II Lesson 5 https://colab.research.google.com/github/How-to-Learn-to-Code/python-class/blob/master/Lesson_5_Pandas_DataFrame/Lesson5_pandas_DataFrame_Student.ipynb
6 NumPy Lesson 6 https://colab.research.google.com/github/How-to-Learn-to-Code/python-class/blob/master/Lesson_6_NumPy/Lesson_6_NumPy_Student_Version.ipynb
7 Plotting Lesson 7 https://colab.research.google.com/github/How-to-Learn-to-Code/python-class/blob/master/Lesson_7_Plotting/plotting_student.ipynb
8-a Intro to scikit-learn Lesson 8a https://colab.research.google.com/github/How-to-Learn-to-Code/python-class/blob/master/Lesson_8a_Scikit_Learn/scikit_learn_student.ipynb
8-b The Python Ecosystem Lesson 8b https://colab.research.google.com/github/How-to-Learn-to-Code/python-class/blob/master/Lesson_8b_Python_Ecosystem/Lesson_8b_Python_Ecosystem_teacher.ipynb
8-c Scanpy for single-cell Lesson 8c https://colab.research.google.com/github/How-to-Learn-to-Code/python-class/blob/master/Lesson_8c_scanpy/Lesson_8c_scanpy.ipynb

(Rows link to the rendered lesson pages; the right-hand URL opens the same notebook in Colab.)


Try an interactive Pyodide cell

Below is a small Python snippet running in your browser via Pyodide. Click Run Code to execute it:

sum([10, 20, 30, 40, 50])
150