This course is held by Andrea Giussani, Academic Fellow in Computer Science at Bocconi University. You can reach him out either at 📧 or on Linkedin ⚡
You will find:
- a
class_materialfolder containing the class material used in this course; - a
extra_materialfolder containing extra material from which you might benefit from;
The Google Colab is a product from Google Research which allows
anybody to write and execute arbitrary python code through the browser, and is especially well suited to machine learning, data analysis and education. More technically, Colab is a hosted Jupyter notebook service that requires no setup to use, while providing free access to computing resources including GPUs.
For more information, please visit the following link.
Here, we provide a short tutorial on how to upload the data on that environemnt via Google drive, and then use the Google colab to run your analysis. Please, note that we assume you have a google account to access to this Google product.
From your favourite browser, open a new colab notebook via the following link
We assume you have placed the data into the My Drive folder. If so, connecting your drive to a google machine is pretty easy, using the python google library: just run the following code snippet
from google.colab import drive
drive.mount('/content/drive')After an authorisation check, you will be able to interact with your drive content either from the file browser side panel (easier) or using command-line utilities.
I suggest to create a folder inside your drive. For example, call it iulm-2023. Then, in any colab notebook cell, type the following commands
%cd '/content/drive/My Drive/iulm-2023'and then clone the following repository:
!git clone https://github.com/cloudacademy/2023-python-iulm.gitNow, you have to navigate inside the Google Drive folder where the repo has been cloned. Once there, you just need to open, say, a ipynb file with Google Colab. And that's it! 😄
Just run the following snippet to put the raw data into a pandas dataframe:
import pandas as pd
df = pd.read_csv('/content/drive/My Drive/<PATH_TO_FILE>/<FILENAME>.csv')Are you ready? Let us get started!