NotebookConsole
Jupyter Notebook's Console¶
A Jupyter console is an interactive terminal that allows you to execute code, inspect variables, and use shell commands.
It is connected to a Jupyter notebook’s Python kernel, which means that you can access the same variables and functions that are defined in the notebook. This makes it a powerful tool for debugging and testing code, as well as for exploring data interactively.
This notebook provides an example on how to open a Jupyter console in VIM which is connected to the notebook’s kernel. To integrate Vim with a Jupyter Console, it's possible to use the vim-floaterm plugin.
In [11]:
# Cell 1: Import the libraries
import pandas as pd
import numpy as np
In [12]:
# Cell 2: Create a DataFrame with some random data
df = pd.DataFrame(np.random.randint(0, 100, size=(10, 4)), columns=list('ABCD'))
df
Out[12]:
Descriptive statistics¶
In [30]:
# Cell 3: Calculate some statistics on the DataFrame
df.describe(percentiles = [.5])
Out[30]:
Correlation matrix¶
In [28]:
df.corr()
Out[28]:
In [14]:
# Cell 4: Sort the DataFrame by column A
# df.sort_values(by='A')
In [ ]: