You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently only support arithmetics with 2 operands, i.e. the following throw an exception:
df['total_quantity'] * df['taxful_total_price'] * 0.65
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/michael/projects/eland/eland/series.py", line 678, in __mul__
return self._numeric_op(right, _get_method_name())
File "/Users/michael/projects/eland/eland/series.py", line 1039, in _numeric_op
elif np.issubdtype(np.dtype(type(right)), np.number) and np.issubdtype(self._dtype, np.number):
File "/Users/michael/projects/eland/eland/series.py", line 368, in _dtype
return self._query_compiler.dtypes[0]
File "/Users/michael/projects/eland/eland/query_compiler.py", line 104, in dtypes
return self._mappings.dtypes(columns)
File "/Users/michael/projects/eland/eland/mappings.py", line 501, in dtypes
{key: np.dtype(self._source_field_pd_dtypes[key]) for key in field_names})
File "/Users/michael/projects/eland/eland/mappings.py", line 501, in <dictcomp>
{key: np.dtype(self._source_field_pd_dtypes[key]) for key in field_names})
KeyError: 'total_quantity___mul___taxful_total_price'
>>> df['customer_last_name'] + "," + df['customer_first_name']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/michael/projects/eland/eland/series.py", line 521, in __add__
return self._numeric_op(right, _get_method_name())
File "/Users/michael/projects/eland/eland/series.py", line 1014, in _numeric_op
if (np.issubdtype(self._dtype, np.number) and np.issubdtype(right._dtype, np.number)):
File "/Users/michael/projects/eland/eland/series.py", line 368, in _dtype
return self._query_compiler.dtypes[0]
File "/Users/michael/projects/eland/eland/query_compiler.py", line 104, in dtypes
return self._mappings.dtypes(columns)
File "/Users/michael/projects/eland/eland/mappings.py", line 501, in dtypes
{key: np.dtype(self._source_field_pd_dtypes[key]) for key in field_names})
File "/Users/michael/projects/eland/eland/mappings.py", line 501, in <dictcomp>
{key: np.dtype(self._source_field_pd_dtypes[key]) for key in field_names})
KeyError: 'customer_last_name___add___,||str'
I think this is because of the way that we create intermediary field names to store the scripted fields. We'll need logic to understand that the latter operations rely on the first and make the appropriate field names available to subsequent ops.
The text was updated successfully, but these errors were encountered:
We currently only support arithmetics with 2 operands, i.e. the following throw an exception:
I think this is because of the way that we create intermediary field names to store the scripted fields. We'll need logic to understand that the latter operations rely on the first and make the appropriate field names available to subsequent ops.
The text was updated successfully, but these errors were encountered: