/usr/local/lib64/python3.6/site-packages/pandas/tests/indexing/multiindex
NameSizeModeActions
__pycache__/-0755rm
conftest.py5340644editdlrm
test_chaining_and_caching.py19790644editdlrm
test_datetime.py12090644editdlrm
test_getitem.py87670644editdlrm
test_iloc.py49910644editdlrm
test_indexing_slow.py31190644editdlrm
test_insert.py10230644editdlrm
test_ix.py21170644editdlrm
test_loc.py178520644editdlrm
test_multiindex.py32630644editdlrm
test_partial.py76140644editdlrm
test_setitem.py157920644editdlrm
test_slice.py253390644editdlrm
test_sorted.py44470644editdlrm
test_xs.py84110644editdlrm
__init__.py00644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/pandas/tests/indexing/multiindex/test_insert.py (1023B)
from numpy.random import randn from pandas import DataFrame, MultiIndex, Series import pandas._testing as tm class TestMultiIndexInsertion: def test_setitem_mixed_depth(self): arrays = [ ["a", "top", "top", "routine1", "routine1", "routine2"], ["", "OD", "OD", "result1", "result2", "result1"], ["", "wx", "wy", "", "", ""], ] tuples = sorted(zip(*arrays)) index = MultiIndex.from_tuples(tuples) df = DataFrame(randn(4, 6), columns=index) result = df.copy() expected = df.copy() result["b"] = [1, 2, 3, 4] expected["b", "", ""] = [1, 2, 3, 4] tm.assert_frame_equal(result, expected) def test_dataframe_insert_column_all_na(self): # GH #1534 mix = MultiIndex.from_tuples([("1a", "2a"), ("1a", "2b"), ("1a", "2c")]) df = DataFrame([[1, 2], [3, 4], [5, 6]], index=mix) s = Series({(1, 1): 1, (1, 2): 2}) df["new"] = s assert df["new"].isna().all()