mars icon indicating copy to clipboard operation
mars copied to clipboard

[BUG] Mars dataframe psrs run failed on pandas==1.3.0

Open fyrestone opened this issue 3 years ago • 0 comments

Describe the bug A clear and concise description of what the bug is.

  File "/home/admin/mars/mars/core/operand/core.py", line 491, in execute
    result = executor(results, op)
  File "/home/admin/mars/mars/dataframe/sort/psrs.py", line 713, in execute
    cls._execute_map(ctx, op)
  File "/home/admin/mars/mars/dataframe/sort/psrs.py", line 668, in _execute_map
    cls._execute_dataframe_map(ctx, op)
  File "/home/admin/mars/mars/dataframe/sort/psrs.py", line 602, in _execute_dataframe_map
    poses = cls._calc_poses(a[by], pivots, op.ascending)
  File "/home/admin/mars/mars/dataframe/sort/psrs.py", line 559, in _calc_poses
    pivots[col] = -pivots[col]
  File "/home/admin/.pyenv/versions/3.7.11/lib/python3.7/site-packages/pandas/core/frame.py", line 3607, in __setitem__
    self._set_item(key, value)
  File "/home/admin/.pyenv/versions/3.7.11/lib/python3.7/site-packages/pandas/core/frame.py", line 3792, in _set_item
    self._set_item_mgr(key, value)
  File "/home/admin/.pyenv/versions/3.7.11/lib/python3.7/site-packages/pandas/core/frame.py", line 3751, in _set_item_mgr
    self._iset_item_mgr(loc, value)
  File "/home/admin/.pyenv/versions/3.7.11/lib/python3.7/site-packages/pandas/core/frame.py", line 3741, in _iset_item_mgr
    self._mgr.iset(loc, value)
  File "/home/admin/.pyenv/versions/3.7.11/lib/python3.7/site-packages/pandas/core/internals/managers.py", line 1071, in iset
    blk.set_inplace(blk_locs, value_getitem(val_locs))
  File "/home/admin/.pyenv/versions/3.7.11/lib/python3.7/site-packages/pandas/core/internals/blocks.py", line 361, in set_inplace
    self.values[locs] = values
ValueError: assignment destination is read-only

To Reproduce To help us reproducing this bug, please provide information below:

  1. Your Python version 3.7.11
  2. The version of Mars you use
  3. Versions of crucial packages, such as numpy, scipy and pandas pandas==1.3.0
  4. Full stack of the error.
  5. Minimized code to reproduce the error.

Expected behavior A clear and concise description of what you expected to happen.

Additional context Add any other context about the problem here.

fyrestone avatar Aug 09 '22 11:08 fyrestone