def test_aggregate_imputation_lookup_all(): agg = Aggregate( "a", ["avg", "sum"], { "coltype": "aggregate", "all": {"type": "zero"}, "sum": {"type": "constant", "value": 3}, "max": {"type": "mean"}, }, ) assert agg.column_imputation_lookup()["a_avg"]["type"] == "zero" assert agg.column_imputation_lookup()["a_avg"]["coltype"] == "aggregate" assert agg.column_imputation_lookup()["a_sum"]["type"] == "constant" assert agg.column_imputation_lookup()["a_sum"]["value"] == 3 assert agg.column_imputation_lookup()["a_sum"]["coltype"] == "aggregate"
def test_aggregate_imputation_lookup_all(): agg = Aggregate( "a", ["avg", "sum"], { "coltype": "aggregate", "all": { "type": "zero" }, "sum": { "type": "constant", "value": 3 }, "max": { "type": "mean" } }) assert agg.column_imputation_lookup()['a_avg']['type'] == 'zero' assert agg.column_imputation_lookup()['a_avg']['coltype'] == 'aggregate' assert agg.column_imputation_lookup()['a_sum']['type'] == 'constant' assert agg.column_imputation_lookup()['a_sum']['value'] == 3 assert agg.column_imputation_lookup()['a_sum']['coltype'] == 'aggregate'