Here is an example of the problem:
>>> df = DataFrame({'a':[1,2]},index=[datetime.today(),datetime.today()+timedelta(days=1)])
>>> df
a
2013-02-15 09:36:14.665272 1
2013-02-16 09:36:14.857322 2
>>> dup_index = datetime.today()
>>> df2 = DataFrame({'a':[2,3]},index=[dup_index,dup_index])
>>> df2
a
2013-02-15 09:37:11.701271 2
2013-02-15 09:37:11.701271 3
>>>
>>> df2.reindex(df.index,method='ffill')
Traceback (most recent call last):
...
Exception: Reindexing only valid with uniquely valued Index objects
I wish to merge df2 with df. Because the index times do not match up I wish to match the df2 time with the closest last time in df, which is the first row. One artificial way I had come up with to solve this was to add a fake microsecond value to the second time series so that it becomes unique. But this is slow for big dataframes. Is there a particular reason why this is not allowed? It seems like a logical thing to do. Are there any better ways for me to overcome this limitation?