mars icon indicating copy to clipboard operation
mars copied to clipboard

Allow using md.loc to set values

Open ZYLi24 opened this issue 4 years ago • 1 comments

Is your feature request related to a problem? Please describe. For now, I cannot use md.loc for setting values. For example, I tried df.loc[:, 'column_name'] = function(df). Then the "TypeError: 'DataFrameLoc' object does not support item assignment" would raise.

The alter method I've got from Mars is that use df['column_name'] = function(df). However, this still not that convenient if I would like to setting values for some target rows.

Describe the solution you'd like I would like the Mars allows users to use loc function set values. Just like pandas.

Describe alternatives you've considered md.iloc can be used in some situations. But I would still get "NotImplementedError: Only scalar value is supported to set by iloc" for some circumstances.

Additional context I am new to Mars and not sure whether all my request are really not achieved in Mars. Thank you very much for consider my request and wish Mars all the best for the future.

ZYLi24 avatar Sep 06 '21 05:09 ZYLi24

Thanks, we will try to support it ASAP.

qinxuye avatar Sep 06 '21 05:09 qinxuye