I am trying to combine dates1 and dates2 that combines the data frames sorts them in synchronous order. There are alike date values on both sets and the code should be able to only have one unique value in the output. what code will I need to get the Expected Output below?
import pandas as pd
import numpy as np
dates1 = pd.to_datetime(['2015-10-08 13:41:00',
'2015-10-08 13:44:00', '2015-10-08 13:48:00',
'2015-10-08 13:49:00'])
dates2 = pd.to_datetime(['2015-10-08 13:42:00','2015-10-08 13:44:00', '2015-10-08 13:45:00', '2015-10-08 13:50:00'])
Expected output:
['2015-10-08 13:41:00',
'2015-10-08 13:42:00', '2015-10-08 13:43:00',
'2015-10-08 13:44:00', '2015-10-08 13:45:00',
'2015-10-08 13:46:00', '2015-10-08 13:47:00',
'2015-10-08 13:48:00', '2015-10-08 13:49:00',
'2015-10-08 13:50:00', '2015-10-08 13:51:00']
2015-10-08 13:43:00,2015-10-08 13:46:00,2015-10-08 13:47:00,2015-10-08 13:51:00come from?