From 68906818a58723cbafc1fa4eaef17256d7e51fec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogumi=C5=82=20Kami=C5=84ski?= Date: Wed, 18 Oct 2023 23:39:08 +0200 Subject: [PATCH] fix typo --- src/dataframerow/dataframerow.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dataframerow/dataframerow.jl b/src/dataframerow/dataframerow.jl index f8a035262..5107c8b6a 100644 --- a/src/dataframerow/dataframerow.jl +++ b/src/dataframerow/dataframerow.jl @@ -264,7 +264,7 @@ index(r::DataFrameRow) = getfield(r, :colindex) is_column_insertion_allowed(dfr::DataFrameRow) = index(dfr) isa Index Base.@propagate_inbounds function Base.setindex!(dfr::DataFrameRow, value, idx) - if colinds isa SymbolOrString && columnindex(dfr, colinds) == 0 + if idx isa SymbolOrString && columnindex(dfr, idx) == 0 if !is_column_insertion_allowed(dfr) throw(ArgumentError("creating new columns in a DataFrameRow that subsets " * "columns of its parent data frame is disallowed")) @@ -273,7 +273,7 @@ Base.@propagate_inbounds function Base.setindex!(dfr::DataFrameRow, value, idx) newcol = similar(val, Union{T,Missing}, nrow(parent(dfr))) fill!(newcol, missing) newcol[row(dfr)] = val - parent(dfr)[!, colinds] = newcol + parent(dfr)[!, idx] = newcol else setindex!(parent(dfr), value, row(dfr), parentcols(index(dfr), idx)) end