I want to convert the following pandas time stamp column into float32.
I have filled up the Date
, Time
by the codes as given below
TimeStamp Date Time Day Time float32
04-01-2019 21:58 04-01-2019 21:58:33
04-01-2019 20:23 04-01-2019 20:23:06
31-12-2018 19:26 31-12-2018 19:26:11
For Date
and Time
I have used the following codes in pandas
df['Date'] = pd.to_datetime(df['TimeStamp']).dt.date
df['Time'] = pd.to_datetime(df['TimeStamp']).dt.time
Now what I want is how to populate Day
and Time
.
Besides, how can I convert Date / or TimeStamp to float32.