Skip to content

enh: add select to InterchangeFrame #1263

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

Closed
MarcoGorelli opened this issue Oct 27, 2024 · 2 comments · Fixed by #1283
Closed

enh: add select to InterchangeFrame #1263

MarcoGorelli opened this issue Oct 27, 2024 · 2 comments · Fixed by #1283
Labels
high priority Your PR will be reviewed very quickly if you address this

Comments

@MarcoGorelli
Copy link
Member

We should allow for selecting columns by name in InterchangeFrame, falling back to select_columns_by_name for generic dataframe interchange protocol implementers

@MarcoGorelli MarcoGorelli added the high priority Your PR will be reviewed very quickly if you address this label Oct 27, 2024
@FBruzzesi
Copy link
Member

FBruzzesi commented Oct 27, 2024

Started to take a quick look at this. For DuckDB and Ibis it should be doable with native methods.

For InterchangeFrame, since we both store _native_frame and _interchange_frame, the latter can be slices with select_columns_by_name, yet, how do we return the former object?

From a talk of yours I would conclude that it is by accessing .dataframe attribute, is this true generally? From the docs this is not very clear to me

@MarcoGorelli
Copy link
Member Author

MarcoGorelli commented Oct 27, 2024

That was the "dataframe standard" 😄 The interchange protocol has no standardised way of getting the original dataframe object back

I think we can implement this for duckdb and ibis so it's at least available to plotly, and leave it not implemented for the more generic interchangeframe for now

I've opened an issue about this in the dataframe-api repo, but I'm not holding my breath regarding a response/decision: data-apis/dataframe-api#360

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority Your PR will be reviewed very quickly if you address this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants