How to get date columns in pandas? I need a separate date column(in this format2018-10-08) in this table. please help.

   id   id2     post    id  level   created_at
0   150     126293  BA     237602   0   2018-10-08 15:37:06.404741
1   150     126293  BA     217350   0   2018-09-26 11:27:20.610651
2   4655    169068  BA     172174   1   2018-08-07 15:54:15.961607
3   14058   201462  BA      231703  1   2018-10-04 18:26:06.915134
4   16576   241053  agent   416451  2   2019-02-06 16:59:41.550580
5   16576   241053  agent   423247  2   2019-02-10 18:10:12.987203
6   16700   102938  BA     476606   0   2019-03-07 23:23:36.902590
7   50374   131808  TSM     203392  0   2018-09-13 21:54:45.874108
8   50374   131808  TSM     103873  0   2018-03-23 17:30:20.647447
df['date'] = pd.to_datetime(df['created_at']).dt.date


to_datetime: Convert argument to datetime. For example, if your column of "created_at" is a string column, it converts it to a datetime column 

dt: Access object for datetime like properties of the Series values.