Open In App

Getting Started With Google Colab

Google Colab is the short form for “Google Colabortory“. It is an executable document that lets you write, run, and share code or you can think as an improved version of “Jupyter Notebook” stored in Google Drive. You might be wondering about the word “Notebook“, in simple words it is just a document that includes executable lines of code along with text, images, figures, tables, graphs, equations, and much more that even a layman can able to get insights about the concepts behind it not just developers/programmers out there. It is widely used by data scientists, analysts, and machine learning enthusiasts due to its unique features and advantages.

Getting Started With Google Colab

What makes it different? We might be thinking why colab, why not Jupiter Notebook or any other IDE out there?



A simple and Precise answer would be its active features which make it different.

Here are the highlighted features one should be aware of:



Colab real-time collaboration

Colab resource computation

Colab gitHub & drive integration

How to Use Google Colab

It is a cloud based interface as specified earlier, you can simply get started by the following:

1. Accessing Google Colab

Open your web browser and search for google colab and then simply click the first link provided which will redirect you to the Google Colab’s welcome page.

Colab web browsing

2. Creating a Google Account (if needed) and Sign In

If you don’t have one, simply create a Google account its absolutely free else sign in to your account.

Colab account sign-in

3. Create a new file / notebook

You can simply click on the new notebook redirecting you to a new page to get started.

Colab new notebook creation

OR simply you can select the New notebook in the File menu.

Another method to create new notebook in Colab

4. Executing Code Cell

You can able to write your program within the code cell and can run the code to check your desired output.

code execution in google colab

Working with Google Drive in Google Colab

Linking Drive to Colab

1. Open Google Colab and click on the Mount Drive button.

Mounting drive in Colab

2. Click on the Connect button to give Colab access to your Drive.

connecting colab to drive

google drive gets connected/mounted in collab

Accessing and Saving Notebook in Drive

Once you’ve linked your Drive to Colab, you can access and save notebooks from Drive directly within Colab.

To access a notebook from Drive

1. Click on the File menu and select Open Notebook.

access notebook from file menu

2. Click on the Drive tab and navigate to the notebook you want to open.

open your saved notebook from drive

To save a notebook to Drive

1. Click on the File menu and hit Save your notebook.

save the notebook from file menu

2. Click on the Drive tab and navigate to the folder where you want to save the notebook and click on the Save button.

collab notebooks folder in drive

3. Colab automatically saves your notebooks to a “Colab Notebooks” folder in Google Drive.

colab notebooks folder in drive

Share your Notebook

1. Click on the Share button in the top right corner of the notebook.

select share button

2. Enter the email addresses of the people you want to share the notebook.

share notebook using email address

Additionally you can upload or download your Notebook as .py or .ipynb format.

1. Upload Notebook

upload your colab notebook from file menu

2. Download Notebook

download your colab notebook from file menu

Understanding the Colab Interface

1. Editor

The editor is where you write your code. It also includes a number of features to help you write and debug your code, such as code completion, syntax highlighting, and error messages.

Code cells

Code cells in google colab

Text cells

Colab text area which support Markdown

Additionally you can add new cells by using the + CODE and + TEXT buttons that show when you hover between cells. These buttons are also in the toolbar above the notebook where they can be used to add a cell below the currently selected cell. This makes your code well organized and proof helpful for other people whom you share.

Adding & moving cells using top toolbar in Google colab

2. Runtime

The runtime is where your code is executed. It includes a number of features to help you run your code.

Colab runtimes are servers that are used to execute your code such as :

To select runtime, navigate to the Runtime menu and select Change runtime type according to the usability.

select runtime type from runtime menu

change the required runtime type

Keyboard Shortcuts for a Better Colab Experience

Here are some keyboard shortcuts that you can use to improve your Colab experience:


Article Tags :