From 2c8eb64890b302931b1c9515e78ffe53cbdba633 Mon Sep 17 00:00:00 2001 From: Nathan Boyer <65452054+nathanrboyer@users.noreply.github.com> Date: Wed, 19 Jul 2023 13:35:41 -0400 Subject: [PATCH] Added rename method to docstring (#3362) --- src/abstractdataframe/abstractdataframe.jl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/abstractdataframe/abstractdataframe.jl b/src/abstractdataframe/abstractdataframe.jl index af631da7d..a40627c6a 100644 --- a/src/abstractdataframe/abstractdataframe.jl +++ b/src/abstractdataframe/abstractdataframe.jl @@ -309,7 +309,14 @@ julia> df = DataFrame(i=1, x=2, y=3) ─────┼───────────────────── 1 │ 1 2 3 -julia> rename(df, :i => :A, :x => :X) +julia> rename(df, [:a, :b, :c]) +1×3 DataFrame + Row │ a b c + │ Int64 Int64 Int64 +─────┼───────────────────── + 1 │ 1 2 3 + +julia> rename(df, :i => "A", :x => "X") 1×3 DataFrame Row │ A X y │ Int64 Int64 Int64