In [1]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
In [2]:
%matplotlib inline
In [44]:
# this limit maximum numbers of rows displayed on screen
pd.set_option("display.max_rows", 15)
In [45]:
pd.__version__
Out[45]:
In [46]:
s = pd.Series([1,3,5,np.nan,6,8])
In [47]:
s
Out[47]:
In [38]:
dates = pd.date_range('1950-01', '2013-03', freq='D')
In [39]:
dates
Out[39]:
In [40]:
t = pd.Series(np.ones(dates.shape[0])*5, index=dates)
In [41]:
t_utc = t.tz_localize('UTC')
In [42]:
t_utc
Out[42]:
In [43]:
t.resample('M', how='mean')
Out[43]:
In [30]:
t.resample('M', how='count')
Out[30]:
In [31]:
t.resample('M', how='sum')
Out[31]:
In [ ]: