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

replicate select_columns on the index #1124

Closed
samukweku opened this issue Jun 16, 2022 · 4 comments · Fixed by #1187
Closed

replicate select_columns on the index #1124

samukweku opened this issue Jun 16, 2022 · 4 comments · Fixed by #1187

Comments

@samukweku
Copy link
Collaborator

select_columns can be adapted to index selection as well; not sure about the name though ---> select_index/select_rows?

df.select_index()
df.select_rows()
@ericmjl
Copy link
Member

ericmjl commented Aug 6, 2022

Some of the great work you've done, @samukweku, like incorporating slice()s, would be usable here too! Out of curiosity, what prompted the idea here?

@samukweku
Copy link
Collaborator Author

Thanks @ericmjl . I have come to love the flexibility/abstraction of select_columns hence the idea of extending it to rows.

@ericmjl
Copy link
Member

ericmjl commented Aug 6, 2022

Got it!

select_rows() would be a great addition, definitely.

I can also see us building on top of select_columns() and select_rows() to provide a select(rows=..., columns=...) API that then dispatches down to select_columns() and select_rows(). It would be a nicely chained API that could be more flexible than the built-in .loc[] calls.

@samukweku
Copy link
Collaborator Author

Yea, that would be great. Not sure of the select word though, it seems pandas has plans for that too : pandas-dev/pandas#40322

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants