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

Load data that support the Tables.jl interface #988

Closed
tpoisot opened this issue Nov 18, 2022 · 3 comments
Closed

Load data that support the Tables.jl interface #988

tpoisot opened this issue Nov 18, 2022 · 3 comments

Comments

@tpoisot
Copy link

tpoisot commented Nov 18, 2022

Is your feature request related to a problem? Please describe.
I am trying to work with data that follow the Tables.jl interface, and that I can transform in a DataFrame. Essentially, the iterator for this data structure returns a vector of named tuples. Despite this, I can't figure out how to make this work with MLJ.

Describe the solution you'd like
I'm looking for tips about what to write either using MLJ methods, or adding methods to my own code, to make it happen.

Describe alternatives you've considered
X, y = unpack(DataFrame(X), ==(:Presence)) works, but requires adding DataFrames.jl. I can also use Tables.matrix and get the names for my object, but they all feel like necessary steps.

@ablaom
Copy link
Member

ablaom commented Nov 18, 2022

Thanks for raising this issue.

unpack is designed to work with any table X satisfying Tables.istable(X) == true as it would for any DataFrame, so perhaps this is a bug. To help us confirm and diagnose this, please provide a minimum working example of X that does not work, and the error stack trace or unexpected behaviour you are seeing.

@tpoisot
Copy link
Author

tpoisot commented Nov 19, 2022

Thanks for the response. The package I'm having trouble with is currently unreleased, but I'll try to write something that mimicks the behavior and get back to you with a MRE.

@ablaom
Copy link
Member

ablaom commented Jun 9, 2024

Closing as stale (no further response from poster).

@ablaom ablaom closed this as completed Jun 9, 2024
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

No branches or pull requests

2 participants