Last Updated on May 4, 2023 by mishou

Work in progress.

1. Basics 1 Self-taught learning
2. Basics 2 Making your cheat sheets
3. Basics 3 Google Colaboratory
4. Basics 4 Mathematical operators
5. Basics 5 Autofill and List Comprehensions
6. Basics 6 Tables
7. Basics 7 Classes and Objects
8. Basics 8 Pivot Tables
9. Basics 9 Sample Data Sets
10. Basics 10 Flash Fill
11. Basics 11 Charts
12. Basics 12 Loops
13. Basics 13 Funcitons
14. Basics 14 Macros

I. Create a notebook in Google Colaboratory

You are recommended to use Google Colaboratory for learning Python because you can run Python code online without installing Python on your computer. You don’t have to create a virtual environment. Even if you have got any troubles on Google Colaboratory, they don’t cause any harm to your computer.

You need to create a Google Account beforehand. If you already have a Google Account, click on the following link and create a NEW NOTEBOOK.

Use Shift+Enter to run codes in a cell. You can also click on a button 3  below instead.

II. Getting started

Let me show you some scripts using my sample datasets. First, load all the tables on my page as lists using Pandas. You can show the first table with lists[0] as shown below.

You can see the script and other sample scripts here:

You can learn more about how to handle the sample data sets in Learning Python 2-Sample data

III. Selecting Runtime

Run all: run all code.

Restart runtime: sometimes you are requested to restart runtime after you have installed a library.

Disconnect and delete runtime: delete runtime when you want to run the scripts from the very beginning.

IV. Uploading the data

You can upload a CSV data file on Google Colaboratory and read it with Pandas like this:

You can learn more in the tutorial linked below:

Google Colab – A Step-by-step Guide

By mishou

Leave a Reply

Your email address will not be published. Required fields are marked *