Python Laboratory (2018/2019)

Course partially running (all years except the first)

Learning outcomes

The course "Python Laboratory" is an optional "type f" activity, which allows to students to obtain 3 CFU, once a final examination is passed. In particular:

- The course is open to all CdL and CdLM students in economics and business administration, in particular to the students of the Master’s degree in Economics and of the Master’s degree in Banking and Finance.

- The lessons will take place in a computer laboratory (46 seats).

- Requests for participation will be considered following the registration order considering that priority will be given to CdLM students, in particular to the students of the Master’s degree in Economics and of the Master’s degree in Banking and Finance.

- Participation to the course does not require any particular background knowledge of the software Python.

- The frequency to the classes is compulsory. Students are required to attend at least 2/3 of the exercise lessons and tutorial activities in order to be admitted to the final evaluation.

The course consists of 18 hours of exercise lessons and tutorial activities (plus 2 hours of final examination).

The tentative calendar of the course is the following:

Friday 19 October 2018, hours 14:00-17:30, room LAB.SMS.8;
Friday 26 October 2018, hours 14:00-17:30, room LAB.SMS.8;
Friday 23 November 2018, hours 14:00-17:30, room LAB.SMS.8;
Friday 30 November 2018, hours 14:00-17:30, room LAB.SMS.8;
Friday 7 December 2018, hours 14:00-17:30, room LAB.SMS.8;
Friday 14 December 2018, hours 14:00-17:30, room LAB.SMS.8.

Tutor: dott. Marco Zanotti

Registrations are open from the 11th of October 2018 to the 18th of October 2018.

Please, register through the elearning platform.


Python is a widely used high-level programming language for general-purpose programming. It is an interpreted language, it has a design philosophy that emphasizes code readability and it has a syntax that allows programmers to express concepts in fewer lines of code than might be used in other languages, allowing new users to learn it in a few days. Python features a dynamic type system and automatic memory management and supports multiple programming paradigms, including object-oriented, imperative, functional programming, and procedural styles. It has a large and comprehensive standard library and it can easily be integrated with other programming languages, in particular with R. Python interpreters are available for many operating systems, allowing Python code to run on a wide variety of systems.

Python has gained wide popularity mainly for its use in the management and analysis of large data sets (data science). Today, R and Python are the two most widely used programming languages among data scientists. Both of them have rapidly advanced over the past few years. For these languages there exist many libraries for collecting, handling, visualizing and analyzing large data volumes and for implementing advanced machine learning models. Python is used in many organizations like NASA, Yahoo and Google. Python is open source and free software and has a community-based development model. Other information can be found at and

The program of the course will start with an introduction to the software Python and its main functions. Then, some of the topics encountered in mathematical and statistic courses will be considered, as for example, matrix algebra, optimization and interpolation. Arguments will be presented mainly through examples. The course aims at improving the computational and programming skills of the students and at providing instruments that might be useful for the subsequent thesis work. The activity will allow students to improve the knowledge of a programming language that is highly requested in some sectors of the job market.

Reference books
Author Title Publisher Year ISBN Note
Dmitry Zinoviev Data Science con Python: dalle stringhe al machine learning, le tecniche essenziali per lavorare sui dati (Edizione 1) APOGEO 2017 9788850334148
Joel Grus Data Science from Scratch: First Principles with Python (Edizione 1) O'Reilly Media, Inc. 2015 9781491901410
Sarah Guido, Andreas C. Müller Introduction to Machine Learning with Python (Edizione 1) O'Reilly Media, Inc. 2016 9781449369880
Tony Gaddis Introduzione a Python (Edizione 1) Pearson Italia, Milano-Torino 2016 9788891900999
Samir Madhavan Mastering Python for Data Science (Edizione 1) Packt Publishing 2015 9781784390150
Ahmed Sherif Practical Business Intelligence (Edizione 1) Packt Publishing 2016 9781785885433
Toby Segaran Programming Collective Intelligence (Edizione 1) O'Reilly Media, Inc. 2007 9780596529321
Jake VanderPlas Python Data Science Handbook: Essential Tools for Working with Data (Edizione 1) O'Reilly Media, Inc. 2016 9781491912126
William Wesley McKinney Python for Data Analysis: Data Wrangling with Pandas, NumPy, and IPython (Edizione 2) O'Reilly Media, Inc. 2017 9781491957653
Vahid Mirjalili, Sebastian Raschka Python Machine Learning (Edizione 2) Packt Publishing 2017 9781787125933
Chris Albon Python Machine Learning Cookbook (Edizione 1) O'Reilly Media, Inc. 2018 9781491989371
Allen B. Downey Think Stats: Exploratory Data Analysis (Edizione 2) O'Reilly Media, Inc. 2014 9781491907344
Richard Lawson Web Scraping with Python (Edizione 1) Packt Publishing 2015 9781782164364

Assessment methods and criteria

The final examination will consist in a written exam, with an oral examination if necessary, on the use of the software Python.