Skip to content
New issue

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

loc gives incorrect values when given a Boolean indexer #610

Closed
devin-petersohn opened this issue May 8, 2019 · 2 comments · Fixed by #635
Closed

loc gives incorrect values when given a Boolean indexer #610

devin-petersohn opened this issue May 8, 2019 · 2 comments · Fixed by #635
Labels
pandas concordance 🐼 Functionality that does not match pandas
Milestone

Comments

@devin-petersohn
Copy link
Collaborator

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): OSX
  • Modin installed from (source or binary): source
  • Modin version: 0.6.0.dev.0
  • Python version: 3.6
  • Exact command to reproduce: df.loc[df.col1 < 5]

Describe the problem

loc does not support Boolean indexers. This was originally reported over email and reproduced by me locally.

Source code / logs

import modin.pandas as pd
df = pd.DataFrame({"col1":[1,2,3,4,5,6], "col2":[1,2,3,4,5,6]})
df.loc[df.col1 < 5]
@devin-petersohn devin-petersohn added the pandas concordance 🐼 Functionality that does not match pandas label May 8, 2019
@devin-petersohn devin-petersohn added this to the 0.5.1 milestone May 8, 2019
@ipacheco-uy
Copy link
Contributor

Hi Devin, i check and loc does not support boolean and callable, the idea is to fallback or support it?

@devin-petersohn
Copy link
Collaborator Author

Thanks @ipacheco-uy, we won't fallback to support this because it would be really expensive.

I outlined a bit of what is needed in a post on the discourse: https://discuss.modin.org/t/indexing-update-rewrite/57

Indexing needs to be updated because some of the general implementation is too slow. Indexing should be fast and correct. We also have diverged codepaths for loc and __getitem__, which doesn't make a lot of sense because they do similar things. They should at least be the same in the backend.

devin-petersohn added a commit to devin-petersohn/modin that referenced this issue May 24, 2019
* Resolves modin-project#610
* Adds a fastrack to lists of columns and boolean indexers
williamma12 pushed a commit that referenced this issue May 26, 2019
* Support boolean indexers and other properties in `loc`

* Resolves #610
* Adds a fastrack to lists of columns and boolean indexers

* Fix transposed getitem

* Address comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pandas concordance 🐼 Functionality that does not match pandas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants