From 0c372b02fa9fd8b1beb9a6d220d4aca7d521db39 Mon Sep 17 00:00:00 2001 From: Ron Wolf Date: Sat, 23 Nov 2024 17:08:44 -0800 Subject: [PATCH 1/2] @df -- Support string column names Add a special case to `add_sym!` to convert an `AbstractString` column name to a `Symbol` before adding it. The old behavior would iterate over the string and try to add each character as a column name. This produced a stack overflow, since `add_sym!` had no special case for `Char`, resulting in indefinite recursion. --- StatsPlots/src/df.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/StatsPlots/src/df.jl b/StatsPlots/src/df.jl index f4df36d88..e2c986be5 100644 --- a/StatsPlots/src/df.jl +++ b/StatsPlots/src/df.jl @@ -191,6 +191,8 @@ get_col(syms, col_nt, names) = hcat((get_col(s, col_nt, names) for s ∈ syms).. # get the appropriate name when passed an Integer add_sym!(cols, i::Integer, names) = push!(cols, names[i]) +# get the appropriate name when passed an AbstractString +add_sym!(cols, str::AbstractString, names) = add_sym!(cols, Symbol(str), names) # check for errors in Symbols add_sym!(cols, s::Symbol, names) = s in names ? push!(cols, s) : cols # recursively extract column names From 56514c75f6fef7f288518feee8d3a83feba55434 Mon Sep 17 00:00:00 2001 From: Ron Wolf Date: Sat, 23 Nov 2024 17:15:12 -0800 Subject: [PATCH 2/2] Add Ron Wolf to .zenodo.json --- .zenodo.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.zenodo.json b/.zenodo.json index fec2e5ead..01b2c5b08 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -789,6 +789,10 @@ { "name": "Patrick Jaap", "type": "Other" + }, + { + "name": "Wolf, Ron", + "type": "Other" } ], "upload_type": "software"