You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia version is 1.52
packages are:
using CSV
using DataFrames
using Pipe
using RData
using Statistics
my DataFrame is very simple:
df = @pipe train|>select(_, :v2 )
but when i use Pair in select, error happens such as:
select(df, :v2 => :a1)
##MethodError: no method matching getindex(::DataFrames.Index, ::Pair{Symbol,Symbol})
Closest candidates are:
getindex(::DataFrames.Index, !Matched::Symbol) at C:\Users\linghuxfeng.julia\packages\DataFrames\S3ZFo\src\other\index.jl:259
getindex(::DataFrames.Index, !Matched::AbstractArray{Symbol,1}) at C:\Users\linghuxfeng.julia\packages\DataFrames\S3ZFo\src\other\index.jl:260
getindex(::DataFrames.AbstractIndex, !Matched::Bool) at C:\Users\linghuxfeng.julia\packages\DataFrames\S3ZFo\src\other\index.jl:154
...
Stacktrace:
[1] select(::DataFrame, ::Pair{Symbol,Symbol}; copycols::Bool) at C:\Users\linghuxfeng.julia\packages\DataFrames\S3ZFo\src\dataframe\dataframe.jl:881
[2] select(::DataFrame, ::Pair{Symbol,Symbol}) at C:\Users\linghuxfeng.julia\packages\DataFrames\S3ZFo\src\dataframe\dataframe.jl:881
[3] top-level scope at In[6]:1
[4] include_string(::Function, ::Module, ::String, ::String) at .\loading.jl:1091
[5] execute_code(::String, ::String) at C:\Users\linghuxfeng.julia\packages\IJulia\a1SNk\src\execute_request.jl:27
[6] execute_request(::ZMQ.Socket, ::IJulia.Msg) at C:\Users\linghuxfeng.julia\packages\IJulia\a1SNk\src\execute_request.jl:86
[7] #invokelatest#1 at .\essentials.jl:710 [inlined]
[8] invokelatest at .\essentials.jl:709 [inlined]
[9] eventloop(::ZMQ.Socket) at C:\Users\linghuxfeng.julia\packages\IJulia\a1SNk\src\eventloop.jl:8
[10] (::IJulia.var"#15#18")() at .\task.jl:356
You are using DataFrames.jl version 0.20.2. Please update the package to the latest version (at this moment 0.21.8, soon it will be 0.22). This will fix the problem.
julia version is 1.52
packages are:
using CSV
using DataFrames
using Pipe
using RData
using Statistics
my DataFrame is very simple:
df = @pipe train|>select(_, :v2 )
but when i use Pair in select, error happens such as:
select(df, :v2 => :a1)
##MethodError: no method matching getindex(::DataFrames.Index, ::Pair{Symbol,Symbol})
Closest candidates are:
getindex(::DataFrames.Index, !Matched::Symbol) at C:\Users\linghuxfeng.julia\packages\DataFrames\S3ZFo\src\other\index.jl:259
getindex(::DataFrames.Index, !Matched::AbstractArray{Symbol,1}) at C:\Users\linghuxfeng.julia\packages\DataFrames\S3ZFo\src\other\index.jl:260
getindex(::DataFrames.AbstractIndex, !Matched::Bool) at C:\Users\linghuxfeng.julia\packages\DataFrames\S3ZFo\src\other\index.jl:154
...
Stacktrace:
[1] select(::DataFrame, ::Pair{Symbol,Symbol}; copycols::Bool) at C:\Users\linghuxfeng.julia\packages\DataFrames\S3ZFo\src\dataframe\dataframe.jl:881
[2] select(::DataFrame, ::Pair{Symbol,Symbol}) at C:\Users\linghuxfeng.julia\packages\DataFrames\S3ZFo\src\dataframe\dataframe.jl:881
[3] top-level scope at In[6]:1
[4] include_string(::Function, ::Module, ::String, ::String) at .\loading.jl:1091
[5] execute_code(::String, ::String) at C:\Users\linghuxfeng.julia\packages\IJulia\a1SNk\src\execute_request.jl:27
[6] execute_request(::ZMQ.Socket, ::IJulia.Msg) at C:\Users\linghuxfeng.julia\packages\IJulia\a1SNk\src\execute_request.jl:86
[7] #invokelatest#1 at .\essentials.jl:710 [inlined]
[8] invokelatest at .\essentials.jl:709 [inlined]
[9] eventloop(::ZMQ.Socket) at C:\Users\linghuxfeng.julia\packages\IJulia\a1SNk\src\eventloop.jl:8
[10] (::IJulia.var"#15#18")() at .\task.jl:356
select(df, :v2 => (x -> x .- minimum(x)) => :vv2 )
MethodError: no method matching getindex(::DataFrames.Index, ::Pair{Symbol,Pair{var"#45#46",Symbol}})
Closest candidates are:
getindex(::DataFrames.Index, !Matched::Symbol) at C:\Users\linghuxfeng.julia\packages\DataFrames\S3ZFo\src\other\index.jl:259
getindex(::DataFrames.Index, !Matched::AbstractArray{Symbol,1}) at C:\Users\linghuxfeng.julia\packages\DataFrames\S3ZFo\src\other\index.jl:260
getindex(::DataFrames.AbstractIndex, !Matched::Bool) at C:\Users\linghuxfeng.julia\packages\DataFrames\S3ZFo\src\other\index.jl:154
...
Stacktrace:
[1] select(::DataFrame, ::Pair{Symbol,Pair{var"#1#2",Symbol}}; copycols::Bool) at C:\Users\linghuxfeng.julia\packages\DataFrames\S3ZFo\src\dataframe\dataframe.jl:881
[2] select(::DataFrame, ::Pair{Symbol,Pair{var"#1#2",Symbol}}) at C:\Users\linghuxfeng.julia\packages\DataFrames\S3ZFo\src\dataframe\dataframe.jl:881
[3] top-level scope at In[7]:1
[4] include_string(::Function, ::Module, ::String, ::String) at .\loading.jl:1091
[5] execute_code(::String, ::String) at C:\Users\linghuxfeng.julia\packages\IJulia\a1SNk\src\execute_request.jl:27
[6] execute_request(::ZMQ.Socket, ::IJulia.Msg) at C:\Users\linghuxfeng.julia\packages\IJulia\a1SNk\src\execute_request.jl:86
[7] #invokelatest#1 at .\essentials.jl:710 [inlined]
[8] invokelatest at .\essentials.jl:709 [inlined]
[9] eventloop(::ZMQ.Socket) at C:\Users\linghuxfeng.julia\packages\IJulia\a1SNk\src\eventloop.jl:8
[10] (::IJulia.var"#15#18")() at .\task.jl:356
it seems that DataFrames select does not have method to handle Pair.
The text was updated successfully, but these errors were encountered: