We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
Arithmetic cannot process period type.
To Reproduce To help us reproducing this bug, please provide information below:
In [1]: import pandas as pd In [2]: import mars.dataframe as md In [3]: s = md.Series(pd.period_range("2000-01-01", periods=10, freq="D")) In [4]: left, right = s[2], s[7] In [6]: ((s >= left) & (s <= right)).execute() --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-6-a4d787f38c66> in <module> ----> 1 ((s >= left) & (s <= right)).execute() ~/Workspace/mars/mars/dataframe/arithmetic/__init__.py in call(df, other, **kw) 89 raise ValueError('Can only compare ' 90 'identically-labeled DataFrame object') ---> 91 return wrap_notimplemented_exception(func)(df, other, **kw) 92 return call 93 ~/Workspace/mars/mars/dataframe/utils.py in wrapper(*args, **kwargs) 844 def wrapper(*args, **kwargs): 845 try: --> 846 return func(*args, **kwargs) 847 except NotImplementedError: 848 return NotImplemented ~/Workspace/mars/mars/dataframe/arithmetic/greater_equal.py in ge(df, other, axis, level) 50 def ge(df, other, axis='columns', level=None): 51 op = DataFrameGreaterEqual(axis=axis, level=level, lhs=df, rhs=other) ---> 52 return op(df, other) ~/Workspace/mars/mars/dataframe/arithmetic/core.py in __call__(self, x1, x2) 486 def __call__(self, x1, x2): 487 x1 = self._process_input(x1) --> 488 x2 = self._process_input(x2) 489 if isinstance(x1, SERIES_TYPE) and isinstance(x2, DATAFRAME_TYPE): 490 # reject invoking series's op on dataframe ~/Workspace/mars/mars/dataframe/arithmetic/core.py in _process_input(x) 437 return DataFrame(x) 438 elif isinstance(x, (list, tuple, np.ndarray, TENSOR_TYPE)): --> 439 return astensor(x) 440 raise NotImplementedError 441 ~/Workspace/mars/mars/tensor/datasource/array.py in tensor(data, dtype, order, chunk_size, gpu, sparse) 132 if isinstance(data, TensorData): 133 data = Tensor(data) --> 134 return data.astype(dtype or data.dtype, order=order, copy=False) 135 elif isinstance(data, (tuple, list)) and len(data) > 0 and \ 136 all(isinstance(d, TENSOR_TYPE) for d in data): ~/Workspace/mars/mars/tensor/base/astype.py in _astype(tensor, dtype, order, casting, copy) 151 array([1, 2, 2]) 152 """ --> 153 dtype = np.dtype(dtype) 154 tensor_order = get_order(order, tensor.order) 155 TypeError: Cannot interpret 'period[D]' as a data type
The text was updated successfully, but these errors were encountered:
Series.between
Successfully merging a pull request may close this issue.
Describe the bug
Arithmetic cannot process period type.
To Reproduce
To help us reproducing this bug, please provide information below:
The text was updated successfully, but these errors were encountered: