In [9]:
import numpy as np
import pandas as pd
%matplotlib inline
In [10]:
rng = pd.date_range('1/1/2011', periods=72, freq='H')
In [11]:
rng.dtype
Out[11]:
In [20]:
delta = pd.Series(np.random.randn(len(rng)), index=rng)
In [23]:
delta.head()
Out[23]:
In [21]:
ts = delta.cumsum()
In [24]:
ts.head()
Out[24]:
In [22]:
ts.plot()
Out[22]:
Change frequency and fill gaps
In [25]:
conv = ts.asfreq('45Min', method='pad')
In [26]:
conv.head()
Out[26]: