VS Code Python Tool Now Does Native Notebooks

The Python Extension for VS Code Insiders team is previewing the newest implementation of notebooks, used frequently in data science with offerings such as Jupyter Notebooks.

That newest implementation is called Native Notebooks, and it leverages the Native Notebooks API to revamp the data science experience in Microsoft's open source, cross-platform code editor that for years has fully embraced Python, used often for data science projects. Notebooks are used to create interactive environments -- such as documents or canvases -- that can include source code and markdown and other media.

"The Notebook API allows Visual Studio Code extensions to open files as notebooks, execute notebook code cells, and render notebook outputs in a variety of rich and interactive formats," Microsoft's documentation says. It further notes that the Notebook API seeks to enable experiences inside VS Code similar to those found when using popular notebook interfaces like Jupyter Notebook or Google Colab.

The Notebook API
[Click on image for larger view.] The Notebook API (source: Microsoft).

Three main features of the new experience include:

  • Improved integration between extensions in notebooks: Developers can now use the same extensions for editing source code or markdown text in the VS Code Editor from within notebooks "For example, you won't miss your VIM key bindings or your stylishly colored brackets anymore."
  • Improved load times: This is illustrated by an example notebook that 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!"
  • New interface: This sports a fresh look and feel along with other UI changes and cell manipulation capabilities that match VS Code's design language.

Other new features range from file management functionality to highly requested shortcuts to quick cell manipulation enhancements, which are detailed in the post along with guidance about how to try Native Notebooks with the VS Code Insiders build.

Going forward, program manager Claudia Regio said in a July 27 blog post, the team will seek to ensure feature parity with the existing Python notebooks experience by implementing features and functionality such as:

  • Data viewer
  • Variable explorer
  • Run-by-line (see here)
  • Gather (see here)

Other feature suggestions can be made at the GitHub repo.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


  • ML.NET Improves Object Detection

    Microsoft improved the object detection capabilities of its ML.NET machine learning framework for .NET developers, adding the ability to train custom models with Model Builder in Visual Studio.

  • More Improvements for VS Code's New Python Language Server

    Microsoft announced more improvements for the new Python language server for Visual Studio Code, Pylance, specializing in rich type information.

  • Death of the Dev Machine?

    Here's a takeaway from this week's Ignite 2020 event: An advanced Azure cloud portends the death of the traditional, high-powered dev machine packed with computing, memory and storage components.

  • COVID-19 Is Ignite 2020's Elephant in the Room: 'Frankly, It Sucks'

    As in all things of our new reality, there was no escaping the drastic changes in routine caused by the COVID-19 pandemic during Microsoft's big Ignite 2020 developer/IT pro conference, this week shifted to an online-only event after drawing tens of thousands of in-person attendees in years past.

  • Visual Studio 2019 v16.8 Preview Update Adds Codespaces

    To coincide with the Microsoft Ignite 2020 IT pro/developer event, the Visual Studio dev team shipped a new update, Visual Studio 2019 v16.8 Preview 3.1, with the main attraction being support for cloud-hosted Codespaces, now in a limited beta.

Upcoming Events