Notebooks are getting revamped!

Claudia Regio

Claudia

The Python Extension for VS Code Insiders is excited to announce the new preview for Native Notebooks! Native Notebooks are VS Code’s newest implementation of notebooks and the Python Extension is leveraging the Native Notebooks API to revamp the data science experience! Users can now benefit from the new functionalities below:

  • The same extensions that users rely on when editing source code or markdown text in the VS Code Editor are now available in notebooks! For example, you won’t miss your VIM key bindings or your stylishly colored brackets anymore.
  • In addition to an improved integration between extensions in notebooks, we have drastically improved the load time for notebooks! The following notebook builds and assesses the accuracy of an image recognition model that differentiates between dog breeds contains 49 code cells, 18 markdown cells, and their outputs (~5MB). The current notebook editor takes about 7 seconds to open this notebook, but the new notebook editor takes less than a second!
  • Last but not least, the new interface has a fresh look and feel along with additional UI changes and cell manipulation capabilities that match VS Code’s design language that we’d love to get your feedback on.

Our goal is to reduce the time it takes you to get your work done and done well, with the sum of all these cumulative changes.

For additional information on the new Native Notebooks API, click here.

How to try out Native Notebooks:

We are currently exclusively rolling out this new experience in VS Code Insiders build. If you do not already have it, download and install the latest version of the Python Extension from the marketplace or install it directly from the extension gallery in Visual Studio Code.

To try the new native notebook, follow the instructions below:

  1. Make sure the Python extension is activated. You can do so by creating a new notebook (Ctrl + Shift + P “Python: Create New Blank Jupyter Notebooks”).
  2. File -> Open Folder…
  3. Right click on the .ipynb file you would like to open and select “Open in preview Notebook Editor”.

How to try native notebooks

What else is new?

  • File management: Save as, Rename, Open from file, etc.
  • Highly requested shortcuts: Undo/Redo (Ctrl + Z/Command Z)
  • Cell execution times to help you better understand the performance of your code and notebooks as a whole
  • Quick cell manipulation
    • Join cells using the command “Notebook: Join with Next Cell” or “Notebook: Join with Previous Cell” for easy merging
    • Split cells at your cursor location using the “Split Cell” icon on the cell toolbar
    • Drag and drop capabilities for easy position rearrangement

Joining and Splitting Cell

  • Collapsible cells and code blocks to ensure that irrelevant code is neatly tucked away while you are focusing on the most pertinent code and optimizing screen space.

Collapsing Cell

What’s in store?

We will be working diligently to roll over the current fan favorite features such as data viewer and variable explorer as well as newly released functionality such as run-by-line and Gather to ensure feature parity with the existing Python notebooks experience!

Keep an eye out for continued improvement of Native Notebooks! If you would like to contribute to the development please leave a suggestion on our vscode-python GitHub repo. We look forward to hearing your feedback!

 

For Early Adopters:

VS Code Insiders has the most recent code pushes and may lead to the occasional broken build. It is recommended to make a copy of your file prior to trying the new experience.

7 comments

Leave a comment