1Consider the dataframe df
2
3df = pd.DataFrame(dict(timestamp=pd.to_datetime(['2000-01-01'])))
4
5df
6
7 timestamp
80 2000-01-01
9Use the datetime accessor dt to access the strftime method. You can pass a format string to strftime and it will return a formatted string. When used with the dt accessor you will get a series of strings.
10
11df.timestamp.dt.strftime('%Y-%m-%d')
12
130 2000-01-01
14Name: timestamp, dtype: object
15Visit strftime.org for a handy set of format strings.