Repository: vaexio/vaex

Issue:
ValueError: Unknown expression type: <class '_ast.NameConstant'>
df.x.str.replace(..., regex=False) Works fine.
df.x.str.replace(..., regex=True) seems to work, but crashes when continue to work with the virtual column.

Reproduce: 
```
import vaex
text = ['Something', 'very pretty', 'is coming', 'our', 'way.']
df = vaex.from_arrays(text=text)

# works 
(df.text.str.replace('.','')==df.text.str.replace('.','')).astype(int).sum()

# crashes
(df.text.str.replace('[.]','',regex=True)==df.text.str.replace('[.]','', regex=True)).astype(int).sum()
```


Discussion:
```
Traceback (most recent call last):
  File "/Users/yonatanalexander/.virtualenvs/xvaex/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3331, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-158-65b41fbb4f0f>", line 9, in <module>
    (df.text.str.replace('[.]','',regex=True)==df.text.str.replace('[.]','', regex=True)).astype(int).sum()
  File "/Users/yonatanalexander/.virtualenvs/xvaex/lib/python3.7/site-packages/vaex/expression.py", line 518, in sum
    return self.ds.sum(**kwargs)
  File "/Users/yonatanalexander/.virtualenvs/xvaex/lib/python3.7/site-packages/vaex/dataframe.py", line 867, in sum
    return self._compute_agg('sum', expression, binby, limits, shape, selection, delay, edges, progress, array_type=array_type)
  File "/Users/yonatanalexander/.virtualenvs/xvaex/lib/python3.7/site-packages/vaex/dataframe.py", line 621, in _compute_agg
    self.validate_expression(expression)
  File "/Users/yonatanalexander/.virtualenvs/xvaex/lib/python3.7/site-packages/vaex/dataframe.py", line 2887, in validate_expression
    return vaex.expresso.validate_expression(expression, vars, funcs)
  File "/Users/yonatanalexander/.virtualenvs/xvaex/lib/python3.7/site-packages/vaex/expresso.py", line 79, in validate_expression
    function_set, names)
  File "/Users/yonatanalexander/.virtualenvs/xvaex/lib/python3.7/site-packages/vaex/expresso.py", line 110, in validate_expression
    validate_expression(arg, variable_set, function_set, names)
  File "/Users/yonatanalexander/.virtualenvs/xvaex/lib/python3.7/site-packages/vaex/expresso.py", line 110, in validate_expression
    validate_expression(arg, variable_set, function_set, names)
  File "/Users/yonatanalexander/.virtualenvs/xvaex/lib/python3.7/site-packages/vaex/expresso.py", line 112, in validate_expression
    validate_expression(arg, variable_set, function_set, names)
  File "/Users/yonatanalexander/.virtualenvs/xvaex/lib/python3.7/site-packages/vaex/expresso.py", line 121, in validate_expression
    validate_expression(expr.value, variable_set, function_set, names)
  File "/Users/yonatanalexander/.virtualenvs/xvaex/lib/python3.7/site-packages/vaex/expresso.py", line 131, in validate_expression
    raise ValueError("Unknown expression type: %r" % type(expr))
ValueError: Unknown expression type: <class '_ast.NameConstant'>
```

Resolving patch:
diff --git a/packages/vaex-core/vaex/expresso.py b/packages/vaex-core/vaex/expresso.py
--- a/packages/vaex-core/vaex/expresso.py
+++ b/packages/vaex-core/vaex/expresso.py
@@ -119,6 +119,8 @@ def validate_expression(expr, variable_set, function_set=[], names=None):
             validate_expression(comparator, variable_set, function_set, names)
     elif isinstance(expr, _ast.keyword):
         validate_expression(expr.value, variable_set, function_set, names)
+    elif isinstance(expr, _ast.NameConstant):
+        pass  # like True and False
     elif isinstance(expr, _ast.Subscript):
         validate_expression(expr.value, variable_set, function_set, names)
         if isinstance(expr.slice.value, _ast.Num):


Test patch:
diff --git a/tests/expresso_test.py b/tests/expresso_test.py
--- a/tests/expresso_test.py
+++ b/tests/expresso_test.py
@@ -1,4 +1,5 @@
 from vaex.expresso import parse_expression, node_to_string, simplify, translate, validate_expression
+import vaex
 
 
 def test_compare():
@@ -26,6 +27,13 @@ def test_simplify():
     assert simplify("b + a * 0") == "b"
 
 
+def test_kwargs():
+    text = ['Something', 'very pretty', 'is coming', 'our', 'way.']
+    df = vaex.from_arrays(text=text)
+    expression = df.text.str.replace('[.]', '', regex=True)
+    df.validate_expression(expression.expression)
+
+
 def test_lists():
     node = parse_expression("searchsorted(['9E', 'AA', 'AQ', 'AS', 'B6', 'CO', 'DL', 'EV', 'F9', 'FL', 'HA', 'MQ', 'NW', 'OH', 'OO', 'UA', 'US', 'WN', 'XE', 'YV'], UniqueCarrier)")
     assert node is not None