Пример #1
0
def test_panel_index():
    index = panelm.panel_index([1, 2, 3, 4], [1, 2, 3])
    expected = MultiIndex.from_arrays(
        [np.tile([1, 2, 3, 4], 3),
         np.repeat([1, 2, 3], 4)],
        names=['time', 'panel'])
    tm.assert_index_equal(index, expected)
Пример #2
0
def test_panel_index():
    index = panelm.panel_index([1,2,3,4], [1,2,3])
    expected = MultiIndex.from_arrays([np.tile([1,2,3,4], 3),
                                       np.repeat([1,2,3], 4)])
    assert(index.equals(expected))
Пример #3
0
def test_panel_index():
    index = panelm.panel_index([1, 2, 3, 4], [1, 2, 3])
    expected = MultiIndex.from_arrays(
        [np.tile([1, 2, 3, 4], 3),
         np.repeat([1, 2, 3], 4)])
    assert (index.equals(expected))