def test_set_index_3(shuffle_method):
    df = pd.DataFrame(np.random.random((10, 2)), columns=['x', 'y'])
    ddf = dd.from_pandas(df, npartitions=5)
    ddf2 = ddf.set_index('x', shuffle=shuffle_method, max_branch=2, npartitions=ddf.npartitions)
    df2 = df.set_index('x')
    assert_eq(df2, ddf2)
    assert (ddf2.npartitions == ddf.npartitions)
def test_set_index_3(shuffle_method):
    df = pd.DataFrame(np.random.random((10, 2)), columns=['x', 'y'])
    ddf = dd.from_pandas(df, npartitions=5)
    ddf2 = ddf.set_index('x', shuffle=shuffle_method, max_branch=2, npartitions=ddf.npartitions)
    df2 = df.set_index('x')
    assert_eq(df2, ddf2)
    assert (ddf2.npartitions == ddf.npartitions)