-
Notifications
You must be signed in to change notification settings - Fork 15
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
Unexpected behavior for row table #61
Comments
julia> rt |> Select(1, 3)
ERROR: BoundsError: attempt to access 0-element Vector{Union{}} at index [[1, 3]]
Stacktrace: Mmm. What am I missing here? |
The issue with Center is probably because of the annoying fact that Tables.columnnames(rt) returns empty tuple for row-tables. The columnnames trait only works with column-tables. We need to first convert to Tables.columntable before proceeding with the implementation I guess? The issue with Select may be related to the same trait. @eliascarv can you take a look at this? |
We should also add a lot of tests with row tables to make sure that we are not missing other issues before v1.0. |
Dictionary row tables also cannot be julia> drt = Tables.dictrowtable(X);
julia> drt |> Center()
ERROR: type NamedTuple has no field names
julia> drt |> Center()
ERROR: type NamedTuple has no field names |
I think the problem is in the way we are using the names = Tables.columnnames(table) But this is the correct way: cols = Tables.columns(table)
names = Tables.columnnames(cols) |
I will do a PR to fix this problem. |
@eliascarv @juliohm Thanks for addressing this so quickly ❤️ |
You are welcome! |
I expected this:
But not this:
The text was updated successfully, but these errors were encountered: