In [1]:
import numpy as np
import pandas as pd
In [2]:
ts = pd.Series(np.random.randn(800),
                index=pd.date_range('1/2/2019', periods=800))
In [3]:
ts = ts.cumsum()
In [10]:
ts.plot()
Out[10]:
<matplotlib.axes._subplots.AxesSubplot at 0x8da8390>

On a DataFrame, the plot() method is a convenience to plot all of the columns with labels:

In [5]:
df = pd.DataFrame(np.random.randn(800, 4), index=ts.index,
                   columns=['E', 'F', 'G', 'H'])
In [6]:
df = df.cumsum()
In [7]:
import matplotlib.pyplot as plt

plt.close('all')
In [8]:
plt.figure()
Out[8]:
<Figure size 432x288 with 0 Axes>
<Figure size 432x288 with 0 Axes>
In [9]:
df.plot()
plt.legend(loc='best')
Out[9]:
<matplotlib.legend.Legend at 0x8c8d048>