Exemple #1
0
def test_simple_mapper():
    df = pd.DataFrame({'t1': [1, 2, 3], 't2': [-1, -2, -3]})
    result_df = pd.DataFrame({
        't5': [0, 0, 0],
        't4': [2, 4, 6]
    }).sort_index(axis=1)
    output_df = simple_test.process(df)['output'].sort_index(axis=1)
    assert output_df.equals(result_df)
Exemple #2
0
def test_simple_mapper():
    df = pd.DataFrame(
        {
            't1': [1, 2, 3],
            't2': [-1, -2, -3]
        }
    )
    result_df = pd.DataFrame(
        {
            't5': [0, 0, 0],
            't4': [2, 4, 6]
        }
    ).sort_index(axis=1)
    output_df = simple_test.process(df)['output'].sort_index(axis=1)
    assert output_df.equals(result_df)
Exemple #3
0
def test_simple_mapper():
    df = pd.DataFrame(
        {
            't1': [1, 2, 3],
            't2': [-1, -2, -3]
        }
    )
    result_df = pd.DataFrame(
        {
            't6': [0, 0, 0],
            't4': [2, 4, 6],
            't5': [-1, -4, -9]
        }
    ).sort_index(axis=1)
    simple_test.append(ConstantDataSource, construct_arguments=[df])
    output_df = simple_test.process(output_channels=['root']).sort_index(axis=1)
    assert output_df.equals(result_df)