function numobs(x)
if Tables.istable(x)
length(Tables.rows(x))
else
error("numobs not defined")
end
end
function getobs(x, i)
if Tables.istable(x)
Tables.rows(x)[i]
else
error("numobs not defined")
end
end
The TableDataset that will be ported from FastAI to MLDatasets supports this along with faster paths for specific implementations of the Tables.jl interface.
We could implement a generic fallback like: