From e42b8d34345d7b2f5dd22d1f74df495403297acb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogumi=C5=82=20Kami=C5=84ski?= Date: Sun, 11 Nov 2018 21:53:06 +0100 Subject: [PATCH] fix typos --- src/abstractdataframe/iteration.jl | 2 +- src/dataframe/dataframe.jl | 4 ++-- src/deprecated.jl | 2 +- test/iteration.jl | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/abstractdataframe/iteration.jl b/src/abstractdataframe/iteration.jl index a4a00fda7d..2db3168e88 100644 --- a/src/abstractdataframe/iteration.jl +++ b/src/abstractdataframe/iteration.jl @@ -120,7 +120,7 @@ Base.size(itr::DataFrameColumns) = (size(itr.df, 2),) Base.IndexStyle(::Type{<:DataFrameColumns}) = Base.IndexLinear() function Base.getindex(itr::DataFrameColumns{<:AbstractDataFrame, - Pair{Symbol, AbstractVector}}, j::Int) = + Pair{Symbol, AbstractVector}}, j::Int) Base.depwarn("Indexing into a return value of eachcol will return a pair " * "of column name and column value", :getindex) itr.df[j] diff --git a/src/dataframe/dataframe.jl b/src/dataframe/dataframe.jl index 819c5091c4..4cff773383 100644 --- a/src/dataframe/dataframe.jl +++ b/src/dataframe/dataframe.jl @@ -779,7 +779,7 @@ deletecols!(df::DataFrame, c::Any) = deletecols!(df, index(df)[c]) function deleterows!(df::DataFrame, ind::Union{Integer, UnitRange{Int}}) for i in 1:ncol(df) - _columns(df)[i] = deleteat!(rawcolumns(df)[i], ind) + _columns(df)[i] = deleteat!(_columns(df)[i], ind) end df end @@ -805,7 +805,7 @@ function deleterows!(df::DataFrame, ind::AbstractVector{Int}) keep[ikeep:end] = idf:n for i in 1:ncol(df) - _columns(df)[i] = rawcolumns(df)[i][keep] + _columns(df)[i] = _columns(df)[i][keep] end df end diff --git a/src/deprecated.jl b/src/deprecated.jl index 8114622dc7..5c89121ec3 100644 --- a/src/deprecated.jl +++ b/src/deprecated.jl @@ -1425,7 +1425,7 @@ function Base.hash(df::SubDataFrame, h::UInt) end function Base.getindex(itr::DataFrameColumns{<:SubDataFrame, - Pair{Symbol, AbstractVector}}, j::Int) = + Pair{Symbol, AbstractVector}}, j::Int) Base.depwarn("Indexing into a return value of eachcol on SubDataFrame will return a pair " * "of column name and a view of column value", :getindex) itr.df[:, j] diff --git a/test/iteration.jl b/test/iteration.jl index f63c81eaa5..2fadf2616d 100644 --- a/test/iteration.jl +++ b/test/iteration.jl @@ -18,9 +18,9 @@ module TestIteration @test size(columns(df)) == (size(df, 2),) @test length(eachcol(df)) == size(df, 2) @test length(columns(df)) == size(df, 2) - @test eachcol(df)[1] == (:A => df[1]) + @test eachcol(df)[1] == df[1] # this will be (:A => df[1]) after deprecation @test columns(df)[1] == df[1] - @test collect(eachcol(df)) isa Vector{Pair{Symbol, AbstractVector}} + @test collect(eachcol(df)) isa Vector{AbstractVector} # this will be Vector{Pair{Symbol, AbstractVector}} after deprecation @test collect(eachcol(df)) == [:A => Union{Missing, Int64}[1, 2] :B => Union{Missing, Int64}[2, 3]] @test collect(columns(df)) isa Vector{AbstractVector}