Skip to content

Commit 35dd6ac

Browse files
committed
TST: validate #2257 fixed by 19dc284
1 parent 19dc284 commit 35dd6ac

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

RELEASE.rst

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ pandas 0.10.0
4949
- Escape tabs in console output to avoid alignment issues (#2038)
5050
- Properly box datetime64 values when retrieving cross-section from
5151
mixed-dtype DataFrame (#2272)
52+
- Fix concatenation bug leading to #2057, #2257
5253

5354
pandas 0.9.1
5455
============

pandas/tools/tests/test_merge.py

+24
Original file line numberDiff line numberDiff line change
@@ -1392,6 +1392,30 @@ def test_panel_concat_other_axes(self):
13921392
expected.ix['ItemC', :, :2] = 'baz'
13931393
tm.assert_panel_equal(result, expected)
13941394

1395+
def test_panel_concat_buglet(self):
1396+
# #2257
1397+
def make_panel():
1398+
index = 5
1399+
cols = 3
1400+
def df():
1401+
return DataFrame(np.random.randn(index,cols),
1402+
index = [ "I%s" % i for i in range(index) ],
1403+
columns = [ "C%s" % i for i in range(cols) ])
1404+
return Panel(dict([("Item%s" % x, df()) for x in ['A','B','C']]))
1405+
1406+
panel1 = make_panel()
1407+
panel2 = make_panel()
1408+
1409+
panel2 = panel2.rename_axis(dict([ (x,"%s_1" % x)
1410+
for x in panel2.major_axis ]),
1411+
axis=1)
1412+
1413+
panel3 = panel2.rename_axis(lambda x: '%s_1' % x, axis=1)
1414+
panel3 = panel3.rename_axis(lambda x: '%s_1' % x, axis=2)
1415+
1416+
# it works!
1417+
concat([ panel1, panel3 ], axis = 1, verify_integrity = True)
1418+
13951419
def test_concat_series(self):
13961420
ts = tm.makeTimeSeries()
13971421
ts.name = 'foo'

0 commit comments

Comments
 (0)