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!)
This is an excellent tool for discovering, comparing, or just learning about different Database Management Systems (951 and counting!)
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!
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!
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-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!
Join 25,000+ intelligent readers and receive AI tips every Tuesday!
Hi Reader, Last week, I encouraged you to experiment with different LLMs, since there’s no one model that is superior across all use cases. Specifically, I suggested you try using Chatbot Arena, which allows you to chat with multiple models at once. It’s completely free, but has two significant disadvantages: Your chats are not private and may be used for research. It lacks the feature-rich interface provided by other LLMs. Today, I want to offer you a better method for experimenting with...
Hi Reader, Over the past 50 tips, I’ve touched on many different topics: Python, Jupyter, pandas, ML, data visualization, and so on. Going forward, I’m planning to focus mostly on Artificial Intelligence. I’m announcing this so you know what to expect, and I know what to deliver! 💌 I’ll also try to make the tips shorter, so that they're easier to digest on-the-go. Finally, I plan to include an “action item” each week, so that you can practice what you’re learning. I hope you like these...
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...