In [21]:
import pandas as pd
import matplotlib.pyplot as plt
import random
import datetime
%matplotlib inline

In [8]:
times=pd.date_range('2014-01-01 00:00','2014-01-01 23:59',freq='m')

In [9]:
times


Out[9]:
<class 'pandas.tseries.index.DatetimeIndex'>
Length: 0, Freq: M, Timezone: None

In [29]:
data=pd.Series([random.random() for i in range(10)],index=[random.choice(times) for i in range(10)])

In [26]:
times=[datetime.datetime.strptime('2014-01-'+str(i).zfill(2),'%Y-%M-%d') for i in range(1,24)]

In [32]:
data


Out[32]:
2014-01-13 00:01:00    0.680792
2014-01-02 00:01:00    0.209129
2014-01-18 00:01:00    0.579536
2014-01-11 00:01:00    0.287803
2014-01-17 00:01:00    0.615827
2014-01-15 00:01:00    0.719194
2014-01-03 00:01:00    0.107620
2014-01-23 00:01:00    0.679192
2014-01-21 00:01:00    0.912743
2014-01-14 00:01:00    0.580640
dtype: float64

In [33]:
?pd.DataFrame

In [49]:
datetime.datetime(2014,1,1)


Out[49]:
datetime.datetime(2014, 1, 1, 0, 0)

In [50]:
df=pd.DataFrame(data={'a':[random.random() for i in range(10)],'b':[random.random() for i in range(10)]},index=[datetime.datetime(2014,1,j) for j in range(1,11)])

In [58]:
df=pd.DataFrame(data={'a':[random.random() for i in range(10)],'b':[random.random() for i in range(10)]},index=[datetime.datetime(2014,1,random.randint(1,30)) for j in range(1,11)])

In [59]:
df.plot(style='+-')


Out[59]:
<matplotlib.axes.AxesSubplot at 0x7fd53af81d50>

In [1]:
from IPython.core.display import HTML
styles = open("../css/custom.css", "r").read()
HTML(styles)


Out[1]:

In [ ]: