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

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube