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
Returning the DataFrame isself is not ideal, I think. A DataFrame is conceptually not really a collection of columns - for example, length(cols) is not defined, and you also can't map(f, cols) over the columns, nor can you iterate over the columns with [... for col in cols] or similar.
I think we should do
Tables.columns(df::DataFrame) =eachcol(df)
instead.
The text was updated successfully, but these errors were encountered:
The only things required of the return type of Tables.columns is that Tables.columnnames and Tables.getcolumn are defined, which DataFrame satisfies. I think what you're looking for is Tables.Columns(df), which provides the iteration/getindex/getproperty convenience methods you mentioned.
Both DataFrameColumns and DataFrame support Tables.columns interface. Also if I understand things correctly Tables.columns does not promise an object that is "conceptually a collection of columns".
Can you please give more justification for the proposed change? The reason is that we would like to avoid being breaking till 1.0 release and what we have now conforms to the Tables.columns contract.
Currently, we have
Returning the
DataFrame
isself is not ideal, I think. ADataFrame
is conceptually not really a collection of columns - for example,length(cols)
is not defined, and you also can'tmap(f, cols)
over the columns, nor can you iterate over the columns with[... for col in cols]
or similar.I think we should do
instead.
The text was updated successfully, but these errors were encountered: