News

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 at Converge 360.

comments powered by Disqus

Featured

  • Build Your First AI Applications with Local AI

    "AI right now feels like a vast space which can be hard to jump into," says Craig Loewen, a senior product manager at Microsoft who is helping devs unsure about making that first daunting leap.

  • On Blazor Component Reusability - From Day 0

    "We want to try to design from Day One, even Day Zero, with reusability in mind," says Blazor expert Allen Conway in imparting his expertise to an audience of hundreds in an online tech event on Tuesday.

  • Decision Tree Regression from Scratch Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of decision tree regression using the C# language. Unlike most implementations, this one does not use recursion or pointers, which makes the code easy to understand and modify.

  • Visual Studio's AI Future: Copilot .NET Upgrades and More

    At this week's Microsoft Ignite conference, the Visual Studio team showed off a future AI-powered IDE that will leverage GitHub Copilot for legacy app .NET upgrades, along with several more cutting-edge features.

  • PowerShell Gets AI-ified in 'AI Shell' Preview

    Eschewing the term "Copilot," Microsoft introduced a new AI-powered tool for PowerShell called "AI Shell," available in preview.

Subscribe on YouTube