Incorrect join of DataFrames with non-unique datetime indices · Issue #1306 · pandas-dev/pandas (original) (raw)

@leonbaum

I'm not sure whether joining of DFs with non-unique indices is now supported, but it's not giving an error and this simple example don't make sense:

In [11]: df1 = pandas.DataFrame({'x': ['a']}, index=[np.datetime64('2012')])

In [12]: df2 = pandas.DataFrame({'y': ['b', 'c']}, index=[np.datetime64('2012')] * 2)

In [13]: df1
Out[13]: 
                     x
1970-01-16 08:09:36  a

In [14]: df2
Out[14]: 
                     y
1970-01-16 08:09:36  b
1970-01-16 08:09:36  c

In [15]: df1.join(df2, how='inner')
Out[15]: 
                     x  y
1970-01-16 08:09:36  a  b

Shouldn't the 1st row of df1 join to both rows of df2?