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 for Converge360.

comments powered by Disqus

Featured

  • Full Stack Hands-On Development with .NET

    In the fast-paced realm of modern software development, proficiency across a full stack of technologies is not just beneficial, it's essential. Microsoft has an entire stack of open source development components in its .NET platform (formerly known as .NET Core) that can be used to build an end-to-end set of applications.

  • .NET-Centric Uno Platform Debuts 'Single Project' for 9 Targets

    "We've reduced the complexity of project files and eliminated the need for explicit NuGet package references, separate project libraries, or 'shared' projects."

  • Creating Reactive Applications in .NET

    In modern applications, data is being retrieved in asynchronous, real-time streams, as traditional pull requests where the clients asks for data from the server are becoming a thing of the past.

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

Subscribe on YouTube