Skip to content

Commit 5dc4f1d

Browse files
committed
more fixes
1 parent fdc4db8 commit 5dc4f1d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

doc/source/whatsnew/v0.24.0.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ MultiIndex
626626

627627
- Removed compatibility for :class:`MultiIndex` pickles prior to version 0.8.0; compatibility with :class:`MultiIndex` pickles from version 0.13 forward is maintained (:issue:`21654`)
628628
- :meth:`MultiIndex.get_loc_level` (and as a consequence, ``.loc`` on a :class:``MultiIndex``ed object) will now raise a ``KeyError``, rather than returning an empty ``slice``, if asked a label which is present in the ``levels`` but is unused (:issue:`22221`)
629-
- Fix `TypeError` in Python 3 when creating `MultiIndex` in which some columns are of object type, e.g. when labels are tuples (:issue:'15457')
629+
- Fix `TypeError` in Python 3 when creating :class: `MultiIndex` in which some columns are of object type, e.g. when labels are tuples (:issue:`15457`)
630630

631631
I/O
632632
^^^

pandas/tests/indexes/multi/test_constructor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,9 +464,11 @@ def test_tuples_with_name_string():
464464
with pytest.raises(ValueError):
465465
pd.Index(li, name='a')
466466

467+
467468
def test_from_tuples_with_tuple_label():
468469
# GH 15457
469-
expected = pd.DataFrame([[2, 1, 2], [4, (1, 2), 3]], columns=['a', 'b', 'c']).set_index(['a', 'b'])
470+
expected = pd.DataFrame([[2, 1, 2], [4, (1, 2), 3]],
471+
columns=['a', 'b', 'c']).set_index(['a', 'b'])
470472
idx = pd.MultiIndex.from_tuples([(2, 1), (4, (1, 2))], names=('a', 'b'))
471473
result = pd.DataFrame([2, 3], columns=['c'], index=idx)
472474
tm.assert_frame_equal(expected, result)

0 commit comments

Comments
 (0)