Learn Data Science from Data School 📊

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

Published 6 months ago • 2 min read

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 (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 📊

Kevin Markham

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, happy Tuesday! My recent tips have been rather lengthy, so I'm going to mix it up with some shorter tips (like today's). Let me know what you think! 💬 🔗 Link of the week A stealth attack came close to compromising the world's computers (The Economist) If you haven't heard about the recent "xz Utils backdoor", it's an absolutely fascinating/terrifying story! In short, a hacker (or team of hackers) spent years gaining the trust of an open-source project by making helpful...

13 days ago • 1 min read

Hi Reader, Today's tip is drawn directly from my upcoming course, Master Machine Learning with scikit-learn. You can read the tip below or watch it as a video! If you're interested in receiving more free lessons from the course (which won't be included in Tuesday Tips), you can join the waitlist by clicking here: Yes, I want more free lessons! 👉 Tip #43: Should you discretize continuous features for Machine Learning? Let's say that you're working on a supervised Machine Learning problem, and...

20 days ago • 2 min read

Hi Reader, I'm so excited to share this week's tip with you! It has been in my head for months, but I finally put it in writing ✍️ It's longer than usual, so if you prefer, you can read it as a blog post instead: Jupyter & IPython terminology explained 🔗 Link of the week Python Problem-Solving Bootcamp (April 1-21) Want to improve your Python skills quickly? There's no better way than solving problems, reviewing alternative solutions, and exchanging ideas with others. That's the idea behind...

about 1 month ago • 3 min read
Share this post