Examples
import numpy as np
import pandas as pd
s = pd.Series([2, 4, 3])
s.plot.line()
The following example shows the populations for some animals over the years.
df = pd.DataFrame({
'goat': [22, 15, 470, 660, 1876],
'cow': [5, 20, 240, 400, 2000]
}, index=[2014, 2015, 2016, 2017, 2018])
lines = df.plot.line()
An example with subplots, an array of axes is returned:
axes = df.plot.line(subplots=True)
type(axes)
The following example shows the relationship between both populations.
lines = df.plot.line(x='goat', y='cow')