I am having issues with joins in pandas and I am trying to figure out what is wrong.
Say I have a dataframe x:
Does your index have duplicates x.index.is_unique? If so would explain the behavior you're seeing:
In [16]: left
Out[16]:
a
2000-01-01 1
2000-01-01 1
2000-01-01 1
2000-01-02 2
2000-01-02 2
2000-01-02 2
In [17]: right
Out[17]:
b
2000-01-01 3
2000-01-01 3
2000-01-01 3
2000-01-02 4
2000-01-02 4
2000-01-02 4
In [18]: left.join(right)
Out[18]:
a b
2000-01-01 1 3
2000-01-01 1 3
2000-01-01 1 3
2000-01-01 1 3
2000-01-01 1 3
2000-01-01 1 3
2000-01-01 1 3
2000-01-01 1 3
2000-01-01 1 3
2000-01-02 2 4
2000-01-02 2 4
2000-01-02 2 4
2000-01-02 2 4
2000-01-02 2 4
2000-01-02 2 4
2000-01-02 2 4
2000-01-02 2 4
2000-01-02 2 4