MLJ.jl icon indicating copy to clipboard operation
MLJ.jl copied to clipboard

Load data that support the Tables.jl interface

Open tpoisot opened this issue 3 years ago • 2 comments

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.

tpoisot avatar Nov 18 '22 20:11 tpoisot

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.

ablaom avatar Nov 18 '22 22:11 ablaom

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.

tpoisot avatar Nov 19 '22 22:11 tpoisot

Closing as stale (no further response from poster).

ablaom avatar Jun 09 '24 22:06 ablaom