From 534ea942a00ea1ec8a3702d5e41372ac1e4ed156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogumi=C5=82=20Kami=C5=84ski?= Date: Mon, 25 Sep 2023 10:26:31 +0200 Subject: [PATCH 1/2] Apply suggestions from code review Co-authored-by: Milan Bouchet-Valat --- src/abstractdataframe/abstractdataframe.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/abstractdataframe/abstractdataframe.jl b/src/abstractdataframe/abstractdataframe.jl index c73d8fe11..600601506 100644 --- a/src/abstractdataframe/abstractdataframe.jl +++ b/src/abstractdataframe/abstractdataframe.jl @@ -132,7 +132,7 @@ Each name is changed at most once. Permutation of names is allowed. - `df` : the `AbstractDataFrame` - `d` : an `AbstractDict` or an `AbstractVector` of `Pair`s that maps the original names or column numbers to new names -- `f` : a function which for each column selected by `cols` keyword argument +- `f` : a function which for each column selected by the `cols` keyword argument takes the old name as a `String` and returns the new name that gets converted to a `Symbol`; the `cols` column selector can be any value accepted as column selector by the `names` function @@ -283,7 +283,7 @@ Each name is changed at most once. Permutation of names is allowed. only allowed if it was created using `:` as a column selector. - `d` : an `AbstractDict` or an `AbstractVector` of `Pair`s that maps the original names or column numbers to new names -- `f` : a function which for each column selected by `cols` keyword argument +- `f` : a function which for each column selected by the `cols` keyword argument takes the old name as a `String` and returns the new name that gets converted to a `Symbol`; the `cols` column selector can be any value accepted as column selector by the `names` function From aa3d52836a83b99884fb88d425ef2d76a80af9aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogumi=C5=82=20Kami=C5=84ski?= Date: Mon, 25 Sep 2023 15:04:59 +0200 Subject: [PATCH 2/2] remove unused method --- src/other/index.jl | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/other/index.jl b/src/other/index.jl index 51aa3a31c..ae9358d38 100644 --- a/src/other/index.jl +++ b/src/other/index.jl @@ -108,8 +108,6 @@ function rename!(x::Index, nms::AbstractVector{Pair{Symbol, Symbol}}) return x end -rename!(f::Function, x::Index) = rename!(x, [(n=>Symbol(f(string(n)))) for n in x.names]) - # we do not define keys on purpose; # use names to get keys as strings with copying # or _names to get keys as Symbols without copying