我正在尝试加入两个全部由 vaex 导入的数据框。我认为这应该很简单,但我对vaex expressions
. 这是我所做的:
vx_neighbors.join(vx_neighbours_df, on=['Neighbour', 'Year', 'day'])
我得到了错误:
c:\python-3.8.2\lib\site-packages\vaex\join.py in join(df, other, on, left_on, right_on, lprefix, rprefix, lsuffix, rsuffix, how, allow_duplication, prime_growth, cardinality_other, inplace)
145 left = left if inplace else left.copy()
146
--> 147 on = _ensure_string_from_expression(on)
148 left_on = _ensure_string_from_expression(left_on)
149 right_on = _ensure_string_from_expression(right_on)
c:\python-3.8.2\lib\site-packages\vaex\utils.py in _ensure_string_from_expression(expression)
770 return expression.expression
771 else:
--> 772 raise ValueError('%r is not of string or Expression type, but %r' % (expression, type(expression)))
773
774
ValueError: ['Neighbour', 'Year', 'day'] is not of string or Expression type, but <class 'list'>
如何将列表转换为 vaex 表达式?