Tuesday Tip #28: 10 cool features in Google Colab 😎


Hi Reader,

Welcome to all of the new readers! 👋

My goal with this newsletter is to help you get better at Data Science every week. You can find past tips at tuesday.tips. (Yes, that’s a real URL!)


🔗 Link of the week

Database of Databases

This is an excellent tool for discovering, comparing, or just learning about different Database Management Systems (951 and counting!)


👉 Tip #28: Do your Data Science work online with Google Colab

If you’ve been following me for a while, you know that Jupyter is my preferred environment for writing Python code and working on Data Science projects.

For many people, especially those newer to Python and Data Science, the most convenient option for using Jupyter is to run it online. This avoids any hassles involved with installing Jupyter, Python, or Python libraries on your local machine.

A few years ago, I wrote a 6,000-word comparison of six popular services for running Jupyter in the cloud. Today, I’m going to focus on one of those services (Google Colab) and show you a few tips that can help you to make the most out of it!


Overview of Google Colab

Google Colaboratory, usually referred to as “Google Colab,” is available for free to anyone with a Google account. As long as you’re signed into Google, you can get started by creating a new notebook or uploading an existing Jupyter notebook. Your Colab notebooks are automatically saved in a special folder in your Google Drive, and you can even create new notebooks directly from Drive.

Colab’s biggest strength is that it’s easy to get started, since it’s built on top of familiar Google infrastructure: Google accounts, Google Drive, Google’s sharing functionality, and so on.

It’s certainly not the most full-featured hosted notebook, but keep in mind that more powerful alternatives (such as Deepnote) also add a lot more complexity. As such, Colab is a nice way to get started!


10 useful features in Colab

Open up any Colab notebook (such as this one) and follow along below!

1️⃣ Example notebooks: Click on File, then Open notebook, then Examples to help you get acquainted with some of Colab’s functionality.

2️⃣ Copy to Drive: If you’re viewing someone else’s notebook and you want to save it, click on File, then Save a copy in Drive, or just click the Copy to Drive button below the menu bar.

3️⃣ Locate in Drive: If you’re viewing your own notebook, click on File, then Locate in Drive to open up the (automatically created) folder of Colab notebooks.

4️⃣ Revision history: Click on File, then Revision history to see how your notebook has changed over time and optionally restore a previous version.

5️⃣ GPU: If you need GPU access for better performance, click on Edit, then Notebook settings, then select a GPU.

6️⃣ Command palette: Click on Tools, then Command palette (or Cmd/Ctrl + Shift + P) to bring up a searchable list of every available command.

7️⃣ Desktop notifications: Click on Tools, then Settings, then click the Show desktop notifications for completed executions box to get notified when a long-running task has been completed.

8️⃣ Sharing: Click the Share button in the upper right to share your notebook with others, including the ability for others to comment on or edit your notebook.

9️⃣ Variable inspector: Click the {x} button in the left sidebar to view a list of all defined variables in the current environment.

🔟 Data Table: Open the Data Table example notebook to see how to view a pandas DataFrame in a filterable, searchable, sortable interface.

🤪 And finally, if you want to see something truly ridiculous, click on Tools, then Settings, then Miscellaneous, then turn on all three of the “modes” 🐶🐱🦀


AI coding in Colab

AI-powered features like “code completions, natural language to code generation and even a code-assisting chatbot” have already been integrated into Colab. ✨

As of now, these features are only available to users of a paid plan, though Google has promised to expand access to free users in the future!


If you enjoyed this week’s tip, please forward it to a friend! Takes only a few seconds, and it really helps me reach more people! 🙌

See you next Tuesday!

- Kevin

P.S. When you’re married to a Data Scientist

Did someone awesome forward you this email? Sign up here to receive Data Science tips every week!

Learn Data Science from Data School 📊

Join 25,000+ aspiring Data Scientists and receive Python & Data Science tips every Tuesday!

Read more from Learn Data Science from Data School 📊

Hi Reader, Next week, I’ll be offering a Black Friday sale on ALL of my courses. I’ll send you the details this Thursday! 🚨 👉 Tip #50: What is a "method" in Python? In Python, a method is a function that can be used on an object because of the object's type. For example, if you create a Python list, the "append" method can be used on that list. All lists have an "append" method simply because they are lists: If you create a Python string, the "upper" method can be used on that string simply...

Hi Reader, I appreciate everyone who has emailed to check on me and my family post-Helene! It has been more than 6 weeks since the hurricane, and most homes in Asheville (mine included) still don't have clean, running water. We're hopeful that water service will return within the next month. In the meantime, we're grateful for all of the aid agencies providing free bottled water, free meals, places to shower, and so much more. ❤️ Thanks for allowing me to share a bit of my personal life with...

Hi Reader, Regardless of whether you enrolled, thanks for sticking with me through the launch of my new course! 🚀 I've already started exploring topics for the next course... 😄 🔗 Link of the week git cheat sheet (PDF) A well-organized and highly readable cheat sheet from Julia Evans, the brilliant mind behind Wizard Zines! 👉 Tip #48: Three ways to set your environment variables in Python I was playing around with Mistral LLM this weekend (via LangChain in Python), and I needed to set an...