✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Subplots with timeseries from multiple columns of a data frame

HI how do I create a graph of two subplots with each extracting data from multiple columns of a dataframe.

To plot an individual plot of time series we have been using this

import plotly.offline as py
import cufflinks as cf
import pandas as pd
import numpy as np

py.plot([{
    'x': df.index,
    'y': df[col],
    'name': col

} for col in df.columns], filename='simple-line.html')

but how do I use this if I had to create two such graphs in subplots?