DataTime in pandas


In [1]:
import numpy as np
import pandas as pd
%matplotlib inline

pd.to_datetime()


In [2]:
df = pd.DataFrame({'year': [2015, 2016],
                       'month': [2, 3],
                       'day': [4, 5]})

In [3]:
df


Out[3]:
year month day
0 2015 2 4
1 2016 3 5

In [5]:
timestamp = pd.to_datetime(df)

In [6]:
timestamp


Out[6]:
0   2015-02-04
1   2016-03-05
dtype: datetime64[ns]