I have a dataframe in python. One of its columns is labelled time
, which is a timestamp. Using the following code, I have converted the timestamp to datetime
:
milestone['datetime'] = milestone.apply(lambda x: datetime.datetime.fromtimestamp(x['time']), axis = 1)
Now I want to separate (tokenize) date and time and have two different columns like milestone['only_date']
and milestone['only_time']
. How do I do this?