Microsoft's Polyglot Notebooks bring C#, F#, PowerShell, JavaScript/TypeScript, SQL and more together inside VS Code. Mix languages, share variables, visualize data, create diagrams, and ship repeatable, runnable docs — all in a familiar, Jupyter-like notebook experience.
Below are real screenshots from the official VS Code docs showing the Jupyter‑like notebook UI for Polyglot Notebooks.
Everything you need to get up and running in minutes inside VS Code.
| Action | Windows / Linux | macOS |
|---|---|---|
| Open Command Palette | Ctrl+Shift+P | ⌘⇧P |
| Run cell | Shift+Enter | ⇧Enter |
| Run cell (stay on cell) | Ctrl+Enter | ⌘Enter |
| Insert code cell below | Alt+Enter | ⌥Enter |
| Change cell language | Ctrl+K, M | ⌘K, M |
| Move cell up / down | Alt+↑ / Alt+↓ | ⌥↑ / ⌥↓ |
| Format cell | Shift+Alt+F | ⇧⌥F |
| Find within notebook | Ctrl+F | ⌘F |
Shortcuts are VS Code defaults and may vary if you customized keybindings. See Keyboard Shortcuts and Notebook shortcuts for the latest.
#!csharp
#r "nuget:MathNet.Numerics, 5.0.0"
using MathNet.Numerics.Statistics;
var data = new double[] { 1.2, 2.5, 2.9, 3.1, 4.0, 5.6 };
new {
Count = data.Length,
Mean = data.Mean(),
StdDev = data.StandardDeviation(),
Min = data.Minimum(),
Max = data.Maximum()
}
#!csharp
#r "nuget:Microsoft.Data.Analysis"
using Microsoft.Data.Analysis;
var names = new StringDataFrameColumn("Name", new[] { "Alice", "Bob", "Cara" });
var scores = new Int32DataFrameColumn("Score", new[] { 85, 92, 78 });
var df = new DataFrame(names, scores);
df
#!fsharp
#r "nuget:Plotly.NET.Interactive"
open Plotly.NET
let x = [1;2;3;4]
let y = [10;20;30;40]
Chart.Line(x, y)
#!javascript
import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs";
const el = document.createElement('div');
el.className = 'mermaid';
el.textContent = 'graph TD; A[User]-->B[Notebook]; B-->C[C#]; B-->D[JavaScript]; C-->E[Output]; D-->E;';
display(el);
await mermaid.run();
Official docs, repos, and community learning.
Course by Matt Eland covering ML.NET, data exploration, and Polyglot Notebook workflows.

By Matt Eland. Practical data science with .NET, notebooks, and ML.NET.

Inspiration for mixing languages and audiences.
Ship runnable docs: explain concepts with markdown, call your SDK via C#, then visualize responses in JS.
Use C# for data wrangling and models, JS for visualizations, and SQL cells to query local/remote data.
Create guided labs where attendees run code per step and keep the notebook as reference.
PowerShell cells for scripts, C# for helpers, and markdown checklists for safe, repeatable ops.
Alternate between explanation and code. Compare C# and F# versions side-by-side.
Call REST APIs from C#, parse JSON, then render HTML tables or charts for quick exploration.
#r "nuget:Package, Version" then import with using or open..dib files to Git, or export to .ipynb. Include a README and Requirements (SDK versions, extension link).