DS 208 · Graduate · UP Cebu

Introduction to Programming for Data Science

The course aims at reproducible code: code that another person can run a year later and obtain the same result.

12 weeksBasics to project
SaturdaysThree hours
Fully onlineSlides stay up
IntroductoryNo experience needed

The next slide gives the full schedule.

Noel Jeffrey Pinton · Department of Computer Science

Outline

Course structure: twelve weeks in four parts

The first month covers the language itself and is the most demanding. Later weeks mostly cover libraries — bundles of ready-made code written by others and loaded into a new program — which are easier to learn than the language.

Most names on this slide (NumPy, pandas, SQL, Git…) are tools introduced later. No prior knowledge of them is assumed; each is explained in the week it is introduced.

Weeks 1–4

The language itself

Setting up Python, then types, control flow, functions, data structures and files. Week 4 moves beyond single scripts: objects, errors and project organisation.

Weeks 5–8

Core data libraries

NumPy for arrays, then two weeks of pandas: grouping, merging and reshaping. Then matplotlib and seaborn for presenting results as figures.

Weeks 9–11

External data sources

Reading from files, SQL and APIs. Regular expressions for irregular text. Then Git, environments and debugging, which support the Week 12 project.

Week 12

Final project

One project that uses most of the above, followed by a presentation.

Course scope

Programming as a tool for analysis

The course does not train software engineers. It teaches code as the next tool when an analysis exceeds what a spreadsheet can handle.

Learning objectives

Skills expected by Week 12

Each of the four objectives below can be assessed directly.

Key terms

pandas
a Python library for working with tables of data (Weeks 6–7)
dependency
another library that the code needs in order to run
pinned
written down with its exact version number, so everyone installs the same one
README
a short text file that explains what a project does and how to run it
Course format

Fully online delivery

Classes meet on Saturdays for three contact hours. All other study is self-scheduled.

Using the slides

Common structure of the weekly decks

All weekly decks share one layout, so any week can be studied independently and at any pace.

Each deck is used like a textbook chapter: read, predict, reveal, and pause at the dark slides.

Running code

The ▶ Run button and the weekly lab

From Week 2 onward, Python runs inside the slides and the labs with no installation. Python is downloaded into the web browser on first use.

The slides present an idea, the Run button allows experimentation with it, and the lab applies it. A red error message in either place is normal: read its last line, change the code, and run it again.

Intended audience

No programming experience required

There are no prerequisites beyond graduate standing. Types and control flow are introduced from first principles in Week 2.

Study practices

Four recommended study practices

Programming is learned through practice; observation alone is not sufficient.

Preparation for Week 1

Setting up Python in the browser

A browser-based setup requires no installation and behaves the same on every machine.

Key terms

notebook
a document made of boxes that mix text and runnable code, run one box at a time
cell
one box in a notebook; Shift+Enter runs it and the result appears underneath
print("hello")
tells Python to display the text hello — the quotes mark it as text
Anaconda
a free installer that puts Python and the course libraries on a personal computer
Key terms

Eight terms introduced in Week 1

Memorisation is not required at this stage; Week 1 explains each term again, with examples.

code

Written instructions, in a programming language, that the computer carries out exactly.

e.g. print("hello") is one line of code

Python

The programming language this course uses, widely adopted because its syntax resembles English.

e.g. 1 + 1 is valid Python; it gives 2

notebook

A document of boxes that mix text and runnable code. Colab and Jupyter show notebooks.

e.g. the file opened in Colab on the previous slide

cell

One box in a notebook. Shift+Enter runs it; its result appears underneath.

e.g. a cell containing 1 + 1 shows 2 below it

library

A bundle of ready-made code written by others and loaded into a new program.

e.g. pandas, a library for tables

variable

A name that holds a value. Analogy: a labelled box containing that value.

e.g. price = 100 puts 100 in a box labelled price

error

Python’s report that it could not carry out a line. Errors are normal and fixable.

e.g. misspelling a name gives a NameError

traceback

The report Python prints with an error. Read its last line first: it says what went wrong.

e.g. NameError: name 'pirce' is not defined

Next week

Week 1 · Python & the data science toolkit

Week 1 covers the limits of spreadsheets, the role of each main library, and how to read error messages, which appear frequently throughout the semester.

Week 1 slides are available on the course page for advance reading.