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

Open
tpoisot opened this issue Nov 18, 2022 · 2 comments
Open

Load data that support the Tables.jl interface #988

tpoisot opened this issue Nov 18, 2022 · 2 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.

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