Pandas: Convert Timestamp to datetime.date
I have a pandas column of Timestamp data
In [27]: train["Original_Quote_Date"][6]
Out[27]: Timestamp('2013-12-25 00:00:00')
How can check the equivalence of these objects to DateTime.date objects of the type
datetime.date(2013, 12, 25)
Converting Timestamp to datetime.date using .date method::
t = pd.Timestamp('2013-12-25 00:00:00')
t.date()
datetime.date(2013, 12, 25)
t.date() == datetime.date(2013, 12, 25)
Output:
True
By using this you can convert pandas timestamp to datetime