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

using propertynames on GroupedDataFrame

Open matthieugomez opened this issue 2 weeks ago • 0 comments

The documentation discusses the fact that one can use either names and propertynames to get the name of variables in DataFrame, where the first function returns a vector of strings and the second one returns a vector symbols. However, for a GroupedDataFrame, propertynames returns (:parent, :cols, :groups, :idx, :starts, :ends, :ngroups, :keymap, :lazy_lock). I found this confusing and to solve this, I think it would be good to define

Base.propertynames(df::GroupedDataFrame) = propertynames(parent(df))

matthieugomez avatar Jun 19 '24 13:06 matthieugomez