예제 #1
0
def test_check_n_categories_ser():
    # verifies that check_n_categories generates the expected output
    assert good_result.loc[1, 'n_categories'] == cf.check_n_categories(good['g2']).values
예제 #2
0
def test_check_n_categories_no_dropna_ser():
    # verifies that check_n_categories generates the expected output with nulls
    assert nan_result.loc[0, 'n_categories'] == cf.check_n_categories(nan['g1'], dropna=False).values
예제 #3
0
def test_check_n_categories_df():
    # verifies that check_n_categories generates the expected output
    assert good_result.equals(cf.check_n_categories(good))
예제 #4
0
def test_check_n_categories_no_dropna_df():
    # verifies that check_n_categories generates the expected output with nulls
    assert nan_result.equals(cf.check_n_categories(nan, dropna=False))