Q:

How do I convert timestamp into date?

I wanna covert timestamp in format "%Y-%m-%d %H:%M:%S" into date format "%Y-%m-%d".
My data:
Timestamp   Open    High    Low Close   Volume_(BTC)    Volume_(Currency)   Weighted_Price
142 2017-09-25 00:00:00+00:00   4102.00 4102.99 4098.13 4102.99 3.583970    14704.368394    4102.815806
143 2017-10-02 00:00:00+00:00   3920.66 3923.00 3920.65 3923.00 11.622131   45578.428351    3921.692822
144 2017-10-09 00:00:00+00:00   4391.41 4391.41 4377.95 4377.95 3.356237    14696.859302    4378.970080
145 2017-10-16 00:00:00+00:00   4761.67 4770.99 4761.53 4770.99 4.068390    19394.983344    4767.237680
146 2017-10-23 00:00:00+00:00   5752.20 5756.37 5745.61 5754.30 4.496116    25857.849205    5751.152455

I've tried:
datetime.datetime.utcfromtimestamp(data['Timestamp']).strftime('%Y-%m-%d')

...which returns:

TypeError: cannot convert the series to 

Help would be appreciated. Thanks.

A:

if it is a datetime object you can simply add .date()
date = '2017-09-25 00:00:00+00:00'
date = pd.to_datetime(date).date()
print(date)

2017-09-25

Since this does not automatically work for Series you can do something like:
date = ['2017-09-25 00:00:00+00:00', '2017-09-25 00:00:00+00:00']
date= pd.Series(date)
date = pd.to_datetime(date) 
for i in range(len(date)):
    date[i] = date[i].date()
print(date)

0    2017-09-25
1    2017-09-25

Or you can use (better answer):
date.dt.date

