start_time = [dt.datetime(2016, 12, 17, 3, np.random.randint(0, 59)) for n in
    range(n)]
df = pd.DataFrame({'start_time': start_time, 'end_time': [(date + dt.
    timedelta(0, np.random.randint(0, 3600))) for date in start_time],
    'user': ['A', 'E'] * m})
user_on = df.ix[:, (['end_time', 'user'])].rename(columns={'end_time': 'time'}
    ).assign(on_off=-1)
user_off = df.ix[:, (['start_time', 'user'])].rename(columns={'start_time':
    'time'}).assign(on_off=1)
df = pd.concat([user_on, user_off]).sort_values(by='time')
df = df.groupby(['time', 'user']).sum()
df = df.unstack().cumsum().fillna(method='ffill')
How can I represent the information in this DataFrame as a time series?