Introduction to Jupyter Notebook

----------------------------------------------------------------------
Filename : 01_jupyter_notebook.ipynb
Date     : 22nd June, 2017
Author   : Jaidev Deshpande
Purpose  : Introduction to Jupyter notebook and its features.
Libraries: IPython, JuPyter and matplotlib
----------------------------------------------------------------------

Parts of a Jupyter Notebook

  • ### Cells
  • ### Cells with output
  • ### Toolbar
  • ### Menubar

In [ ]:
# Example of an input-only cell
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('ggplot')
%matplotlib inline

In [ ]:
# Examples of cells with output
print("Hello, World!")

In [ ]:
# Example of inline plotting
t = np.linspace(-2 * np.pi, 2 * np.pi, 1000)
x = np.cos(2 * np.pi * 2 * t)
plt.plot(t, x)

Types of cells

  • ### Code
  • ### Markdown (this is a markdown cell!)
  • ### Raw NBConvert
  • ### Heading (deprecated)

Markdown cells

  • ### Can show rich text
  • ### Can render LaTeX code: $$ e^{i\theta} = \cos(\theta) + i\sin(\theta) $$
  • ### And a lot more...

Special Note: Almost all features of IPython console are available in Jupyter Notebook


In [ ]:
np.arange?

In [ ]:
np.linspace??