New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
concat with axis=1, join='outer' not working correctly #1719
Comments
Just to add my 2 cents on this, it looks like this has not much to to do with DataFrame.concat and happens when you use the fast union for DatetimeIndex objects. Taking inspiration from the original example: import pandas
import pandas.util.testing as put
ts = put.makeTimeSeries(4)
tsWithGaps = ts[::2]
index = ts.index
indexWithGaps = tsWithGaps.index
index
indexWithGaps
index.union(indexWithGaps)
indexWithGaps.union(index)
pandas.Index.union(indexWithGaps, index) and the output:
Just for sake of clarity the problem is in [10] where the union of the indices has length 3 instead of length 4 (the Jan-4 timestamp is missing if you want to know). [11] shows what happened in the non fast union case and is fine. On top of that it's slightly weird that indexWithGaps.union(index) has a 2B frequency. Looking at the existing issues this probably has some overlap with #1708. Interestingly enough this indexing problem doesn't seem to affect aligning timeseries, i.e. both ts.align(tsWithGaps) and tsWithGaps.align(ts) work fine. On the other hand, constructing dataframe is affected as the original bug report showed:
i.e. the dataframe constructed depends on which order you provide the timeseries. |
This was fixed in 5382985 |
http://stackoverflow.com/questions/11761884/pandas-concatouter-not-doing-union
The text was updated successfully, but these errors were encountered: