avatarRoman Orac

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

2653

Abstract

ebooks (or any window) so that it takes less visual space — useful for the Console.</p><figure id="3b3d"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*pkrzwLqlrlqlx-NVjQJSFw.gif"><figcaption>Window management in JupyterLab.</figcaption></figure><p id="6db8">To code without distractions try Full-Screen editing with JupyterLab. It works great on macOS. When using it, it is hard to distinguish JupyterLab from a full-fledged IDE.</p><figure id="716e"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*XOn_KXfCIp_FNzFljCMy7A.gif"><figcaption>Full-Screen editing using Chrome on macOS.</figcaption></figure><p id="57f1">While Full-Screen editing in JupyterLab looks great, I rarely use it as it hides browser tabs, which makes browsing the web difficult. Multiple screen setup might help to overcome this issue.</p><figure id="50e4"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*gddnM-x-u12eMb-_"><figcaption>Photo by <a href="https://unsplash.com/@goshua13?utm_source=medium&amp;utm_medium=referral">Joshua Aragon</a> on <a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h1 id="f355">2. Side by Side</h1><p id="e34c">Side by side view comes in handy when working on a bigger Jupyter Notebook with many plots or many lines of code.</p><p id="ef46">Side by side enables having two views of the same Jupyter Notebook side by side. This reduces unnecessary scrolling.</p><p id="bbe4">To view a Jupyter Notebook side by side, simply right click on the title of the Notebook and select “New view for Notebook”.</p><figure id="3824"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*OYohCjEk7GW6TJQbQC28iA.gif"><figcaption>Side by side view of a Jupyter Notebook.</figcaption></figure><h1 id="a747">3. Workspaces</h1><p id="801e">JupyterLab’s Workspaces comes in handy when working on multiple projects at the same time. Workspaces come builtin with JupyterLab so no third-party extensions are needed.</p><p id="21a8">With Workspaces, you can organize your projects into Workspaces. Then you switch between a Workspace for project A and a Workspace for project B.</p><p id="c30d">Before using Workspaces, I had to close all Notebooks from one project and open the Notebooks for the project I intended to work on. I prefer a clean work environment.</p><p id="a293" type="7">Workspaces make your work environment in JupyterLab cleaner and more organized.</p><p id="4e68">Using Workspaces is really simple. Unknowingly you were already using Workspaces. You start with a default Workspace: <a href="http://localhost:8888/lab">http://l

Options

ocalhost:8888/lab</a>.</p><p id="6f5d">To create a new Workspace (or access the existing one) simply add to the URL: /<a href="http://localhost:8888/lab/workspaces/blog">workspaces/blog</a>. With this, you would access (or create) a blog Workspace. A full URL is <a href="http://localhost:8888/lab/workspaces/blog">http://localhost:8888/lab/workspaces/blog</a>.</p><figure id="6b58"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*GZ72YoxvjcBv3c-ucgpiUQ.gif"><figcaption>Organize your projects in Workspaces.</figcaption></figure><p id="3a14">Workspaces have many powerful features, which are beyond the scope of this article. See <a href="https://jupyterlab.readthedocs.io/en/stable/user/urls.html#url-workspaces-ui">JupyterLab URLs</a> to learn more about Workspaces.</p><h1 id="2f26">4. Show Active File in File Browser</h1><p id="4d39">Usually, we organize related Notebooks together in a folder. In order to access them, we need to go through the directory structure in the File Browser, which is cumbersome.</p><p id="3bfa">JupyterLab has a neat feature, which automatically lists the folder in the File Browser of the active Jupyter Notebook.</p><p id="ad01">To enable this feature, click on settings and “Show active file in File Browser”.</p><figure id="b27f"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*1IYwid3394uQsZ9Kf43zFg.gif"><figcaption>Show active Jupyter Notebook in File Browser.</figcaption></figure><h1 id="bc81">5. Use CLI in Jupyter Notebook</h1><p id="9097">Did you know you can access Command Line Interface (CLI) directly from a Jupyter Notebook? You can run CLI commands with ! prefix.</p><p id="01a6">Let’s say you have a missing Python package. You can simply install it from Jupyter Notebook by running in the cell:</p><div id="9a86"><pre>!pip <span class="hljs-keyword">install</span> numpy</pre></div><figure id="20e3"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*1oHR2VX9PTM3OF5Eplwqbw.gif"><figcaption>Using CLI in a Jupyter Notebook</figcaption></figure><h1 id="ee29">Before you go</h1><p id="dea3">Follow me on <a href="https://twitter.com/romanorac">Twitter</a>, where I regularly <a href="https://twitter.com/romanorac/status/1328952374447267843">tweet</a> about Data Science and Machine Learning.</p><figure id="ab39"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*69rP1pwjJi9mLSFE"><figcaption>Photo by <a href="https://unsplash.com/@cmhedger?utm_source=medium&amp;utm_medium=referral">Courtney Hedger</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure></article></body>

5 Hidden Features in JupyterLab You Should Start Using

These 5 features will simplify your JupyterLab workflow. No third-party extensions required.

Photo by Benjamin Davies on Unsplash

If you work as a Data Scientist, you probably also spend the majority of your workday analyzing data in JupyterLab. So it makes it a good time investment to learn a few built-in JupyterLab features that will simplify your analysis workflow.

In case you’ve missed my other articles about JupyterLab:

Here are few links that might interest you:

- Complete your Python analyses 10x faster with Mito [Product]
- Free skill tests for Data Scientists & ML Engineers [Test]
- All New Self-Driving Car Engineer Nanodegree [Course]

Would you like to read more such articles? If so, you can support me by clicking on any links above. Some of them are affiliate links, but you don’t need to buy anything.

1. Window Management

Did you know that JupyterLab has a built-in window manager (no third party extension needed)?

You can organize Jupyter Notebooks side by side (or even three Notebooks vertically or horizontally). You can also move Jupyter Notebooks (or any window) so that it takes less visual space — useful for the Console.

Window management in JupyterLab.

To code without distractions try Full-Screen editing with JupyterLab. It works great on macOS. When using it, it is hard to distinguish JupyterLab from a full-fledged IDE.

Full-Screen editing using Chrome on macOS.

While Full-Screen editing in JupyterLab looks great, I rarely use it as it hides browser tabs, which makes browsing the web difficult. Multiple screen setup might help to overcome this issue.

Photo by Joshua Aragon on Unsplash

2. Side by Side

Side by side view comes in handy when working on a bigger Jupyter Notebook with many plots or many lines of code.

Side by side enables having two views of the same Jupyter Notebook side by side. This reduces unnecessary scrolling.

To view a Jupyter Notebook side by side, simply right click on the title of the Notebook and select “New view for Notebook”.

Side by side view of a Jupyter Notebook.

3. Workspaces

JupyterLab’s Workspaces comes in handy when working on multiple projects at the same time. Workspaces come builtin with JupyterLab so no third-party extensions are needed.

With Workspaces, you can organize your projects into Workspaces. Then you switch between a Workspace for project A and a Workspace for project B.

Before using Workspaces, I had to close all Notebooks from one project and open the Notebooks for the project I intended to work on. I prefer a clean work environment.

Workspaces make your work environment in JupyterLab cleaner and more organized.

Using Workspaces is really simple. Unknowingly you were already using Workspaces. You start with a default Workspace: http://localhost:8888/lab.

To create a new Workspace (or access the existing one) simply add to the URL: /workspaces/blog. With this, you would access (or create) a blog Workspace. A full URL is http://localhost:8888/lab/workspaces/blog.

Organize your projects in Workspaces.

Workspaces have many powerful features, which are beyond the scope of this article. See JupyterLab URLs to learn more about Workspaces.

4. Show Active File in File Browser

Usually, we organize related Notebooks together in a folder. In order to access them, we need to go through the directory structure in the File Browser, which is cumbersome.

JupyterLab has a neat feature, which automatically lists the folder in the File Browser of the active Jupyter Notebook.

To enable this feature, click on settings and “Show active file in File Browser”.

Show active Jupyter Notebook in File Browser.

5. Use CLI in Jupyter Notebook

Did you know you can access Command Line Interface (CLI) directly from a Jupyter Notebook? You can run CLI commands with ! prefix.

Let’s say you have a missing Python package. You can simply install it from Jupyter Notebook by running in the cell:

!pip install numpy
Using CLI in a Jupyter Notebook

Before you go

Follow me on Twitter, where I regularly tweet about Data Science and Machine Learning.

Photo by Courtney Hedger on Unsplash
Python
Data Science
Jupyter Notebook
Analytics
Jupyterlab
Recommended from ReadMedium