mars-project / mars-project/mars
Support dataframe indexing using df.iloc with mars tensor
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.7k
- Forks
- 325
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
`df.iloc` now supports integer, slice, ndarray and bool tensor, `TensorFancyIndexHandler` could be implemented to support indexing with mars tensor.
Here is the sample code:
``` Python
a = md.DataFrame([1,2,3,4])
a.iloc[mt.tensor([2, 3]),:].execute()
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the TensorFancyIndexHandler mentioned in the issue and inspect how df.iloc currently handles integer, slice, ndarray, and bool tensor indexes. Use the provided DataFrame example as the starting case; done means the mars tensor index executes successfully and returns the selected rows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100