Announcing .NET Jupyter Notebooks
Jupyter Notebooks has been the significant player in the interactive development space for many years, and Notebooks have played a vital role in the continued popularity of languages like Python, R, Julia, and Scala. Interactive experiences like this give users with a lightweight tool (I like to say "interactive paper") for learning, iterative development, and data science and data manipulation.
The F# community has enjoyed F# in Juypter Notebooks from years with the pioneering functional work of Rick Minerich, Colin Gravill and many other contributors!
As Try .NET has grown to support more interactive C# and F# experiences across the web with runnable code snippets, and an interactive documentation generator for .NET Core with the dotnet try global tool, we're happy to take that same codebase to the next level, by announcing C# and F# in Jupyter notebooks.
.NET in Jupyter Notebooks
Even better you can start playing with it today, locally or in the cloud!
.NET in Anaconda locally
- .NET Core 3.0 SDK and 2.1 as currently the
dotnet try
global tool targets 2.1. - Jupyter : JupyterLab can be installed using Anaconda or
conda
orpip
.- For more details on how to do this please checkout the offical Jupyter installation guide.
Install the .NET Kernel
- Open Anaconda Prompt (Installed with Anaconda
- Install the dotnet try global tool
dotnet tool install --global dotnet-try
Please note: If you have the dotnet try
global tool already installed, you will need to uninstall the older version and get the latest before grabbing the Jupyter kernel-enabled version of the dotnet try global tool.
-
Check to see if Jupyter is installed
jupyter kernelspec list
-
Install the .NET kernel!
dotnet try jupyter install
-
Test installation
jupyter kernelspec list
You should see the
.net-csharp
and.net-fsharp
listed.

-
To start a new notebook, you can either type
jupyter lab
Anaconda prompt or launch a notebook using the Anaconda Navigator. -
Once Jupyter Lab has launched in your preferred browser, you have the option to create a C# or a F# notebook

-
Now you can write .NET and and prose side by side, and just hit Shift-Enter to run each cell.
For more information on our APIs via C# and F#, please check out our documentation on the binder side or in the dotnet/try repo in the NotebookExamples folder.
Features
To explore some of the features that .NET notebooks ships with, I put together dashboard for the Nightscout GitHub repo.
HTML output : By default .NET notebooks ship with several helper methods for writing HTML. From basic helpers that enable users to write out a string as HTML or output Javascript to more complex HTML with PocketView. Below I'm using the display() helper method.

Importing packages : You can load NuGet packages using the following syntax. If you've used Rosyln-powered scripting this #r for a reference syntax will be familiar.
#r "nuget:<package name>,<package version>"
For Example
#r "nuget:Octokit, 0.32.0"
#r "nuget:NodaTime, 2.4.6"
using Octokit;
using NodaTime;
using NodaTime.Extensions;
using XPlot.Plotly;
Do note that when you run a cell like this with a #r reference that you'll want to wait as that NuGet package is installed, as seen below with the ... detailed output.
Object formatters : By default, the .NET notebook experience enables users to display useful information about an object in table format.
The code snippet below will display all opened issues in the nightscout/cgm-remote-monitor repo.
display(openSoFar.Select(i => new {i.CreatedAt, i.Title, State = i.State.StringValue, i.Number}).OrderByDescending(d => d.CreatedAt));
With the object formatter feature, the information will be displayed in a easy to read table format.

Plotting
Visualization is powerful storytelling tool and,a key feature of the Jupyter notebook experience. As soon as you import the wonderful XPlot.Plotly F# Visualization Package into your notebooks(using Xplot.Ploty;) you can begin creating rich data visualizations in .NET.
The graphs are interactive too! Hover over the different data points to see the values.

Learn, Create and Share
To learn, create and share .NET notebooks please check out the following resources:
- Learn: To learn online checkout the dotnet/try binder image for a zero install experience.
- Create: To get started on your machine check out the dotnet/try repo. Select the option highlighted option
- Share: If you want to share notebooks you have made using the .NET Jupyter kernel, the easiest way is to generate a Binder image that anyone can run on the web. For more information on how to do this please check out the .NET Jupyter documentation.
Checkout the online .NET Jupyter Notebook I created for to explore the NightScout GitHub project using C# and the Octokit APIs.
- The source is here https://github.com/shanselman/NightscoutDashboard
- but you can run the notebook live just by going to mybinder https://mybinder.org/v2/gh/shanselman/NightScoutDashboard/master?urlpath=lab
We hope you enjoy this new .NET Interactive experience and that you're pleasantly surprised by this evolution of the .NET Try interactive kernel.
Sponsor: Octopus Deploy wanted me to let you know that Octopus Server is now free for small teams, without time limits. Give your team a single place to release, deploy and operate your software.
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.



About Newsletter
https://github.com/dotnet/try
(specifically https://github.com/dotnet/try/tree/master/Microsoft.DotNet.Interactive.Jupyter)
and it'd be great to have more community contributions
Such a great job. Congrats.
[url=https://abnpro.ru/]бетононасосы автомобильные[/url]
I'm a little cautious because every time I've tried to install Python on my PC, I've ended up breaking the installation, ripping it out and giving up :P
I want to share by a Binder image my c# notebooks and I followed this tuto:
This tuto
Everything ok, but when I open my badge/Binder image there´s no kernel installed!!, but the Dockerfile was ok, the builder I think its also ok and if I check the jupyter terminal theres only one kernel!!(the python default). So it is placing the kernels in the wrong way?? Becasue if you do locally it place the kernel in a differente place but it is able to read it! I mean:
`Anacaconda prompt`
(base) C:\Users\enrique.cervino>jupyter kernelspec list
Available kernels:
.net-csharp C:\Users\enrique.cervino\AppData\Roaming\jupyter\kernels\.net-csharp
.net-fsharp C:\Users\enrique.cervino\AppData\Roaming\jupyter\kernels\.net-fsharp
python3 C:\Users\enrique.cervino\AppData\Local\Continuum\anaconda3\share\jupyter\kernels\python3
Local & Roaming?? In local is able to recognise that but in remote maybe it isnt??
I have made two questions on `Reddit` and `Stackoverflow`, here the links with images:
Stackoverflow
something like:
FROM jupyter/scipy-notebook:45f07a14b422
from the binder docs:
Here’s an example of a Dockerfile FROM statement that would work.
FROM jupyter/scipy-notebook:cf6258237ff9
The following examples would not work:
FROM jupyter/scipy-notebook
or
FROM jupyter/scipy-notebook:latest
Is it something Microsoft is officially supporting or a side-project?
In this part:
.NET IN ANACONDA LOCALLY
.NET Core 3.0 SDK and 2.1 as currently the dotnet try global tool targets 2.1.
What am I supposed to install? 3.0 SDK? 2.1? both?
Can you create a working Docker image with Jupyter/.Net?
you make blogging look easy. The overall look of your site
is great, let alone the content! https://anunturi-parbrize.ro/luneta-chrysler-13.html
Comments are closed.
ICSharp.Kernel github
Does this official kernel have a Github repo? I would love to contribute...