How do Python graphics work in Jupyter?
I started another view for this named Python graphics so as to distinguish the 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 # define our two columns of data baby_name = ['Alice','Charles','Diane','Edward'] number_births = [96, 155, 66, 272] # create a dataset from the to sets dataset = list(zip(baby_name,number_births)) dataset # create a Python dataframe from the dataset df = pandas.DataFrame(data = dataset, columns=['Name', 'Number']) df # plot the data df['Number'].plot()
The steps for the script are as follows:
- Import the graphics library (and...