diff --git a/scrunch/datasets.py b/scrunch/datasets.py index b4187fa..a859008 100644 --- a/scrunch/datasets.py +++ b/scrunch/datasets.py @@ -2276,6 +2276,9 @@ def exclude(self, expr=None): expr_obj = {} else: expr_obj = expr + + print(expr_obj) + return self.resource.session.patch( self.resource.fragments.exclusion, data=json.dumps(dict(expression=expr_obj)) diff --git a/scrunch/expressions.py b/scrunch/expressions.py index 5ac6a8e..9e4a98e 100644 --- a/scrunch/expressions.py +++ b/scrunch/expressions.py @@ -632,7 +632,7 @@ def _process(obj, variables): elif op == 'is_valid': real_op = 'all_valid' elif op == 'is_missing': - real_op = 'all_missing' + real_op = 'is_missing' if op in ('is_valid', 'is_missing'): if len(values) != 0: diff --git a/scrunch/tests/test_expressions.py b/scrunch/tests/test_expressions.py index ecc8a0c..533e178 100644 --- a/scrunch/tests/test_expressions.py +++ b/scrunch/tests/test_expressions.py @@ -2170,7 +2170,7 @@ def test_valid_and_missing_funcs_for_arrays(self): expr = 'missing(hobbies)' expr_obj = process_expr(parse_expr(expr), ds) assert expr_obj == { - 'function': 'all_missing', + 'function': 'is_missing', 'args': [ { 'variable': var_url @@ -2184,7 +2184,7 @@ def test_valid_and_missing_funcs_for_arrays(self): 'function': 'not', 'args': [ { - 'function': 'all_missing', + 'function': 'is_missing', 'args': [ { 'variable': var_url