>> First things first, I'm actually going over
the VS Code Insiders experience today.
Most of the features that you're going to see are not
available in the stable version
of VS Code, although some of them are.
To get started, what you're going to need is
the Python extension as well as some other extensions,
but they'll be appended at the end of this demo,
so don't worry if you miss them as I'm speaking.
While our Jupyter extension has
support from many other languages such as Julia or R,
I'm going to be focusing on the Python Notebooks experience today.
Let's get started.
For those of you who are not familiar with Jupyter Notebooks,
what is a Jupyter Notebook?
A Jupyter Notebook is
an interactive programming and computational document,
and it allows users to mix executable code,
equations, visualizations, and narrative text.
Jupyter Notebooks consists of these cells and it is
the flexible ability to run
these cells a couple of times over after tweaking them,
or even out of order,
that is so conducive to the playground nature of
data science which is what led it to
become the de facto tool for data science.
For those of you who are familiar with
our current implementation in VS Code stable,
you might be asking, why are we revamping?
We're moving from a web view implementation to
a natively supported notebook file type implementation.
What that means is you will now benefit from the integration of
all other VS Code extensions in
the VS Code marketplace that you know and love,
such as the Event Key Bindings or Bracket Colorizer.
Those are two very popular ones.
You'll also benefit from
improved notebook load times as well as a new modern design.
How can you try one out in VS Code Insiders?
Obviously first, go online and download VS Code Insiders.
Then you'll want to open
the command palette after
downloading the extensions appended at the end.
You can do that by holding down "Control Shift P",
or "Command Shift P" if you're on a Mac,
and what that's going to do is that's going to pull
up this drop-down list here.
You'll type in the keyword "notebook",
and you'll want to pick the first option that comes up.
It's going to be "Create New Blank Jupyter Notebook."
What happens when you select that command?
What is that going to look like?
For stable users, this looks very different,
so let's go through what's new.
We have our Notebook toolbar,
obviously in the top-right,
consistent with all our other VS Code Notebook toolbars.
Here in the bottom-right of the cell,
we actually have the language picker.
This is going to indicate what language you're working with,
pretty intuitive name, I think.
Down here in the global status bar,
if you click on this action down here,
it's going to bring a
drop-down option of your current [inaudible] ,
or your preferred Python environment.
If you want to switch your Python environment,
this is where you'll want to click.
Next, sometimes if you're working with a notebook
that needs more computational power,
it might take a couple of hours on your local machine,
and you want to actually connect to
a remote server that might have something like a GPU,
this is where you'll want to click.
Here when you click in this area,
you'll get another drop-down.
You'll get three options and
the third option is where you can actually
input the URI to
the remote Jupyter server that you are trying to connect to.
Here we have our cell toolbar and this is completely customizable,
so mine is on the left,
but by default you'll see it on the right,
and you can actually also hide
this toolbar if you're somebody who's very keyboard heavy,
and you're just aren't interested in
seeing the icon surface to you.
Obviously here we have the ability to
add our code and mark down cells.
Last but not least, we have our "Run" icon.
Now, you can click the "Run" icon to execute the cell,
or you can also use one of
our many supported Jupyter shortcuts to run,
such as "Shift Enter".
First things first, this is a feature that is coming from stable.
We are not letting go of Variable Explorer,
Variable Explorer is coming with.
While you're working in your notebook,
it gets very easy to lose track of
the state of your variables as well as the values.
As you're tweaking variables, tweaking DataFrames,
rerunning things, it gets
very easy to lose track of where you're at.
To print statements to try and realize where you're at,
we have the Variable Explorer.
You can access the Variable Explorer through
the Notebook toolbar by clicking on this grid-like icon.
What that's going to do is this is going to pop up
on the bottom of your canvas.
As you can see, we have the name, we have a type,
we have the size, and we have
a preview of the value in this variable.
Over to the left here of one of our variables,
we have access to the Data Viewer.
When you click this icon to the left,
that's actually going to open up the Data Viewer,
and the Data Viewer is an Excel-like view of your data.
It's a lot easier for us to process things this way.
The most powerful part of the Data Viewer
is the ability to filter rows.
If you click this button in the top left,
you're going to get this top panel right up here and what you can
do is you can put in
logical statements here to filter for things quickly.
While you're trying to understand
the quality of your data, for example,
you could write a bunch of code to first identify the issues,
and then you could write a bunch more code
to resolve those issues.
The Data Viewer is going to help you
identify the issues much quicker.
For example, if I write less than
zero in this age area right here,
and none of the rows pop up,
that means my ages are
all acceptable values in terms of data quality.
Next one up, I would do a drum roll for this one,
but it's not going to be good enough.
Next up, table of contents,
I'm really excited to announce that
this is now available in VS Code Insiders.
This has been the number one requested feature from the community.
We're really happy to finally have it.
In order to access the table of contents,
you'll want to make sure first,
you're in the File Explorer tab,
and then you'll want to come to the bottom and open up "Outline".
Sometimes that's sneakily hiding down there, don't lose it.
When you click on "Outline" what you
see is the output on the right.
As you can see here, we have the entire skeleton of the Notebook,
we can see the hierarchical relationship
between our mark down cells and our code cells,
and like many other table of contents,
you can just click to navigate
where you'd like to go in the Notebook.
If you like to navigate just in mark down,
you can go ahead and just collapse those code cells.
Next one, highly sought after feature as well, is Live Share.
Right now, Live Share is
supporting co-editing and bidirectional execution.
Thankfully, I was able to record this
yesterday before my machine turned on me,
so you can see this working.
You can see that I have a co-worker in one of my cells,
and he's actually going to be adding some text and editing,
and then he runs the cell and I am able to
proceed and run the next one.
Obviously there's a lot more to come with
Live Share but right now we are way too
excited to leave out that it was currently functioning,
it had some functionality here.
Go ahead and try it. This is available today,
it launched yesterday in the VS Code Insiders.
Next up we have diffing.
Diffing notebooks has always been a little bit tricky,
there hasn't been an optimal solution quite yet.
VS Code is building a custom rich text editor diff.
What that means is we have a custom ability to diff notebooks,
and as you can see here in this example,
I can see the difference in the code
that leads to a different output.
You can see the outputs
are rendered within the diff which makes it
really easy to see when one of our outputs has changed.
We also have the ability to check metadata and this right here,
to open up the metadata, all you have to do is click on
the chevron in case that is something that is interesting to you.
Another one, Gather.
Gather is actually a complimentary extension.
This is one of those additional ones that you would have to get
in the VS Code marketplace, just like Live Share.
What ends up happening is,
many times when you reach the end of your notebook
and you've tried a couple approaches but you decide,
okay, I want to move forward with this approach,
cleaning your notebook can
be very tricky and can be laborious and error-prone,
as you try and copy and paste cells into a new notebook,
or you try and delete cells from your current notebook,
and the last thing you want to do is delete cells and break
your notebook flow when you've reached the final portion.
What Gather is, Gather is a tool that assists with data cleaning,
and Gather will take only the relevant lines of
code necessary to produce cell output.
As you can see here in my left example, I've got four cells.
I have this third one here,
this is some random code.
It does not contribute to this cell down here in any way.
If I go ahead and click "Gather"
right here on the icon that surfaced,
what's going to be generated is this output in a new notebook,
and by setting you can choose if you'd like it to
export to a new notebook or actually a Python script.
As you can see here, a quick comparison,
we see that our inputs are reduced,
any import that [inaudible]
code that was here before is not in our output,
and as you can see, only the relevant lines of code that
were necessary to create this cell are here.
Gather is meant to speed up
your notebook cleaning process at the end,
hopefully much faster than how you're doing it now.
Once you've reached the final stage of your notebook,
many times what people will do is they will either need
to transfer it to
their production counterparts or they will present it.
We have a quick way for you to do both those things.
We have the export option which is
located in the Notebook toolbar in the top-right again,
and that will bring down a drop-down where you
can again export to Python script for production.
You can export to HTML.
That's especially convenient if you have ipywidgets, for example,
in your notebook and you'd like to actually be able
to still scroll through those,
or if you want something static for presentation purposes,
PDF is available as well.
Here I have a list of the extensions you're going to need again.
It's the Python extension,
it comes with the Jupyter extension,
Live Share, and Gather.
That's it for me for Notebooks.
I hope you guys are excited about Live Share Support,
I hope you're excited about diffing,
I hope you are excited about Gather.
Go home, try it out, and give me feedback.
My contact info is up here on the board,
so if you want to give me feedback or have any feature requests,
please get in touch.
>> Excellent. Thank you so much, Claudia.
We're jumping into the Q&A now and a quick reminder to
folks that might be watching this on other platforms,
if you head on over to aka.ms/learntv,
there's a chat available there where you can
get your questions heard and answered,
and we'll bring them on to the stream and answer them for you.
Claudia, right off the bat,
I know you showed a lot of amazing features that are
part of the revamped Notebooks functionality,
but you also have limited time for
this presentation and other things to work with in here,
what are some of the features that maybe you
didn't get a chance to demo but you'd like to let
the viewers know about when it comes
to the revamping of Notebooks?
>> Yeah. We're also looking forward to support for multi-select.
That opens doors for a lot of quicker actions within Notebooks.
We're also looking forward to notebook templates,
that's a special one near and dear to my heart.
Let's see, what's another one?
I think just more applications of the Gather technology.
We have a lot of ideas of ways that the aggregation of
the code stream can be used and applied
to make life simpler for data scientists.
>> Nice. I got to share too,
I've been slowly learning Python and getting used to it.
When I first discovered just Notebooks in general,
I was blown away by the ability to be able to just write
some scripts up and test it out
separately outside of an application,
so just amazing work you-all are doing.
There was a question that had popped up and it was about maybe,
well, it went away so I'm going to let that go.
In any case, thank you so much, Claudia.
It was very useful and helpful information.
I'm excited to see what's in store for Notebooks moving on.
>> Thanks. Thanks for having me.