Skip to content

Python for data analysis


Course title

Python for data analysis.



Alexandre Perera. Dept. Eng. Sistemes, Automàtica i Inf. Ind. (UPC). 

Alexandre Perera-LLuna se licenció en Física en la Universidad de Barcelona en 1999 y en Ingeniería Eléctrica en 2001. Obtuvo el Doctorado en Física de la misma universidad en 2003. Actualmente es Profesor Asociado de la Universitat Politécnica de Catalunya-BarcelonaTech (UPC ) y lidera el Laboratorio de Bioinformática y Señales Biomédicas (B2SLab).


Course Language



Course schedule

June 19 to 23: 9:00am to 12:00am.



This course will cover a crash course for scientific Python for data analysis for 15h. This crash course will include three main stages:

  • Introduction to Python language as a tool. Workflow, ipython, ipython notebook (jupyter), basic types, mutability and inmutability and object oriented programming.
  • Short introduction to numerical Python and matplotlib for graphical visualization.
  • Introduction to scientific kits for data analysis with machine learning. Principal components analysis, clustering and supervised analysis with multivariate data. 


 Lecture plan

1. Introduction

a. Why Python?
b. Python History
c. Installing Python
d. Python resources

2. Working with Python

a. Workflow
b. ipython vs. CLI
c. Text Editors
d. IDEs
e. Notebook

3. Getting started with Python

a. Introduction
b. Getting Help
c. Basic types
d. Mutable and in-mutable
e. Assignment operator
f. Controlling execution flow
g. Exception handling

4. Functions and Object Oriented Programming

a. Defining Functions
b. Input and Output
c. Standard Library
d. Object-oriented programming

5. Introduction to NumPy

a. Overview
b. Arrays
c. Operations on arrays
d. Advanced arrays (ndarrays)
e. Notes on Performance (\%timeit in ipython)

6. Matplotlib

a. Introduction
b. Figures and Subplots
c. Axes and Further Control of Figures
d. Other Plot Types
e. Animations

7. Python scikits

a. Introduction
b. scikit-timeseries
8. scikit-learn
a. Datasets
b. Sample generators
c. Unsupervised Learning
d. Supervised Learning

i. Linear and Quadratic Discriminant Analysis
ii. Nearest Neighbors
iii. Support Vector Machines

e. Feature Selection

9. Practical Introduction to Scikit-learn

a. Solving an eigenfaces problem

i. Goals
ii. Data description
iii. Initial Classes
iv. Importing data

b. Unsupervised analysis

i. Descriptive Statistics
ii. Principal Component Analysis
iii. Clustering

c. Supervised Analysis

i. k-Nearest Neighbors
ii. Support Vector Classification
iii. Cross validation



A primer on scientific programming with Python, Hans Petter Langtangen, Department of Informatics, University of Oslo (

Scientific Computation: Python Hacking for Math Junkies, Bruce E Shapiro, Sherwood Forest Books