In this video, I'll work with Jupyter Notebook.
I've opened up Anaconda Navigator, and I've done that by going to Start Menu,
clicking Start, and selecting Anaconda Navigator.
Now I can start Jupyter Notebook from here
by clicking Launch on Jupyter Notebook.
Or I can go and
launch Jupyter Notebook from a Command Prompt or from PowerShell.
I'll choose the latter because I can dictate to Jupyter Notebook
what directory I want it to start in and where I want to work from.
Let's go to Command Prompt.
I'll click on Command Prompt on my taskbar.
This is an elevated Command Prompt that I pinned to the taskbar.
So when User Account Control dialog appears, I click Yes
and that opens up the Administrator: Command Prompt.
I'll maximize this window.
Okay so, as I said, you can work from wherever you want this way.
So I'll cd into c:\projects, and I'll clear the screen.
And now to launch Jupyter Notebook, type jupyter notebook.
And this opens up a browser with notebook.
All right, and now I can choose what kind of notebook I want to work with.
I've installed R, and I've also got Python3 installed, so
clicking on New, I can choose between Python3 or R notebook.
I'll start with Python3.
So I'll select that and click on it, and this opens up a new
Python3 notebook with a Python3 kernel running.
So I can do anything in here that I could do, for example, in a Python session.
So for example, if I wanted to work with a dictionary.
So I enter the command to create a dictionary in one of the cells,
and then I press Shift+Enter.
I can also just click Run on the menu bar too.
But Shift+Enter to run it.
And now, if I type d to look at d, I'll see that that is a dictionary.
If I type type(d), again, Python tells me that that is a dictionary.
Another example, let's say that you wanted to define a function,
so let's define a function.
Product, or prod, and there is my function defined.
Now I can call it, and pass two parameters,
5 and 6, so I should get 30 as a result.
The product of 5 and 6 is 30, and that is exactly what I see.
So another example would be
unpacking a tuple by referencing individual elements.
Okay, so I have defined my list with tuples.
Now my enumerable, I'll type 4
and I'll reference those two values in the tuples.
All right, and to run this again, Shift+Enter.
So that is working with Python.
You can also save your work.
So I can save that and name it, and checkpoints are automatically saved.
If I click File, I can also download this notebook as a Python Notebook,
Python file, HTML, and a number of other different options.
Okay, so let's go back to the Home tab,
and now I'll click New, and this time I'll select R.
And this opens a notebook with the R kernel running in it.
So for example, say, I wanted to create a vector.
And like in the Python Notebook, Shift+Enter to run that.
And if I type v, I'll see that there is my vector.
I can also define matrices, so for example, define a matrix,
call it m, and we'll add some elements to our matrix.
We'll give it five columns, and we'll populate it by row,
and I'll type m to output that, so Shift + Enter.
And that runs, so the matrix was created and then echoed back to the screen.
Likewise, I can perform functions or operations on that matrix,
just like if I were in R Studio or in an R Console session.
So for example, m*10, Shift + Enter, and run that.
And just like the Python Notebook, again, I can save.
I can also download as a Python Notebook,
R, HTML, as well as a number of other options.
So the thing about Jupyter Notebook is that you are working on the fly.
You can do everything here that you can in, for example,
an R session or in a Python terminal,
and that includes reading from files, writing to files, and so on.
It also includes using tools like ggplot2,
Dplyr, and then on the Python side, Pandas
and NumPy, and number of other libraries.
So it's just an excellent environment when you're performing
exploratory data analysis.