Python graphics in Jupyter

How does Python graphics work in Jupyter?

I started another view for this named Python Graphics so as to distinguish the work from the previous work.

If we were to build a sample dataset of baby names and the number of births in a year of that name, we could then plot the data.

The Python coding is simple:

import pandas
import matplotlib
%matplotlib inline
baby_name = ['Alice','Charles','Diane','Edward']
number_births = [96, 155, 66, 272]
dataset = list(zip(baby_name,number_births))
df = pandas.DataFrame(data = dataset, columns=['Name', 'Number'])
df['Number'].plot()

The steps of the script are as follows:

  1. Import the graphics library (and data library) that we need.
  2. Define our data.
  3. Convert the data into a format that allows ...

Get Learning Jupyter now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.