Jupyter Notebook is a web-based interactive computational environment. Supports Python, Julia, R etc and is largely for data analysis, data visualization and exploratory computing
JupyterLab is more of an IDE-like experience. It has a modular structure where you can open several notebooks at the same time. Offers more features and can be extended through JupyterLab Extensions.
Internally, a Jupyter notebook is store in JSON. Here is the basic structure:
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"# This is a code cell\\n",
"print('Hello, World!')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## This is a markdown cell\\n",
"You can write text, add images, and format using Markdown."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
"cells"
: An array containing individual cells, where each cell can be of type "code," "markdown," or other types."cell_type"
: Specifies the type of cell ("code" or "markdown")."execution_count"
: Represents the execution count of a code cell."metadata"
: Stores metadata information for a cell."outputs"
: Contains the output of a code cell."source"
: Holds the actual content of the cell, either code or markdown text."metadata"
: Additional metadata for the entire notebook, including kernel information and language details."nbformat"
and "nbformat_minor"
: Indicate the version of the notebook format.