jf328
jf328

Reputation: 7351

pandas concat('outer') not doing union?

It looks pandas.concat is doing 'left outer' join instead of just union the indexes. Seems a bug to me but maybe I'm missing something obvious.

    import pandas
    import pandas.util.testing as put
    ts1 = put.makeTimeSeries()
    ts2 = put.makeTimeSeries()[::2]
    ts3 = put.makeTimeSeries()[::3]
    ts4 = put.makeTimeSeries()[::4]

    ## to join with union
    ## these two are of different length!
    pandas.concat([ts1,ts2], join='outer', axis = 1) 
    pandas.concat([ts2,ts1], join='outer', axis = 1)

Any idea how can I get the full union (as they do claim by using join='outer' on the pandas document)

Thanks.

Upvotes: 3

Views: 1040

Answers (1)

Wes McKinney
Wes McKinney

Reputation: 105491

It's a bug. Opened an issue here:

http://github.com/pydata/pandas/issues/1719

(Please use GitHub for pandas bug reports)

Upvotes: 1

Related Questions