You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if anything is wrong with this, I expected all to return (:x1, :x2). It crossed my mind that this could be an issue due to the source being a dataframe but I also tried a matrix table for X.
Thanks for this wonderful package!
The text was updated successfully, but these errors were encountered:
using DataFrames
using Tables
X = DataFrame(rand(Float64, 4, 2), :auto)
X_row = Tables.columns(Tables.rowtable(X))
println(Tables.columnnames(X_row))
X_dict_row = Tables.columns(Tables.dictrowtable(X))
println(Tables.columnnames(X_dict_row))
X_col = Tables.columntable(X)
println(Tables.columnnames(X_col))
After going through the docs, a table may only define one of Tables.columnnames(Table) or Tables.columnnames(row). Doesn't it seems natural for one to assume that the former should work for any table? In all cases, I wonder if one can know in advance whether they should do Tables.columnnames(Table) or Tables.columnnames(row) (i.e., whether the tables implements Tables.rows or Tables.columns)
For instance,
yields
I wonder if anything is wrong with this, I expected all to return
(:x1, :x2)
. It crossed my mind that this could be an issue due to the source being a dataframe but I also tried a matrix table forX
.Thanks for this wonderful package!
The text was updated successfully, but these errors were encountered: