I have an excel document with two columns, one of which is labelled "YYYY/MM/DD" and the other "HH:MM:SS." I then combined the two columns to make a "datetime" column that outputs the text "YYYY/MM/DD HH:MM:SS"
df['datetime'] = df['YYYY/MM/DD'].astype(str) + ' ' + df['HH:MM:SS'].astype(str)
df['datetime'] = pd.to_datetime(df['datetime'])
Now I want to convert datetime to an integer but am having no luck. This is what I have tried to do:
df['wtime'] = int(float(df['datetime']))
I just want an integer value returned so I can eventually get the start and end time of the data set.