import numpy as np
import pandas as pd
ts = pd.Series(np.random.randn(800),
index=pd.date_range('1/2/2019', periods=800))
ts = ts.cumsum()
ts.plot()
On a DataFrame, the plot() method is a convenience to plot all of the columns with labels:
df = pd.DataFrame(np.random.randn(800, 4), index=ts.index,
columns=['E', 'F', 'G', 'H'])
df = df.cumsum()
import matplotlib.pyplot as plt
plt.close('all')
plt.figure()
df.plot()
plt.legend(loc='best')