allow push!/pushfirst!/append!/prepend! with multiple values #2533
Triggered via pull request
September 25, 2023 13:07
Status
Failure
Total duration
1h 50m 41s
Artifacts
–
ci.yml
on: pull_request
Documentation
8m 28s
Matrix: test
Annotations
7 errors and 10 warnings
Documentation:
src/dataframe/insertion.jl#L458
doctest failure in ~/work/DataFrames.jl/DataFrames.jl/src/dataframe/insertion.jl:458-536
```jldoctest
julia> df = DataFrame(A='a':'c', B=1:3)
3×2 DataFrame
Row │ A B
│ Char Int64
─────┼─────────────
1 │ a 1
2 │ b 2
3 │ c 3
julia> push!(df, (true, false), promote=true)
4×2 DataFrame
Row │ A B
│ Any Int64
─────┼─────────────
1 │ a 1
2 │ b 2
3 │ c 3
4 │ true 0
julia> push!(df, df[1, :])
5×2 DataFrame
Row │ A B
│ Any Int64
─────┼─────────────
1 │ a 1
2 │ b 2
3 │ c 3
4 │ true 0
5 │ a 1
julia> push!(df, (C="something", A=11, B=12), cols=:intersect)
6×2 DataFrame
Row │ A B
│ Any Int64
─────┼─────────────
1 │ a 1
2 │ b 2
3 │ c 3
4 │ true 0
5 │ a 1
6 │ 11 12
julia> push!(df, Dict(:A=>1.0, :C=>1.0), cols=:union)
7×3 DataFrame
Row │ A B C
│ Any Int64? Float64?
─────┼──────────────────────────
1 │ a 1 missing
2 │ b 2 missing
3 │ c 3 missing
4 │ true 0 missing
5 │ a 1 missing
6 │ 11 12 missing
7 │ 1.0 missing 1.0
julia> push!(df, NamedTuple(), cols=:subset)
8×3 DataFrame
Row │ A B C
│ Any Int64? Float64?
─────┼─────────────────────────────
1 │ a 1 missing
2 │ b 2 missing
3 │ c 3 missing
4 │ true 0 missing
5 │ a 1 missing
6 │ 11 12 missing
7 │ 1.0 missing 1.0
8 │ missing missing missing
julia> push!(DataFrame(a=1, b=2), (3, 4), (b=6, a=5))
3×2 DataFrame
Row │ a b
│ Int64 Int64
─────┼──────────────
1 │ 1 2
2 │ 3 4
3 │ 5 6
```
Subexpression:
push!(DataFrame(a=1, b=2), (3, 4), (b=6, a=5))
Evaluated output:
ERROR: ArgumentError: Mixing rows with column names and without column names in a single `push!` call is not allowed
Stacktrace:
[1] push!(df::DataFrame, rows::ByRow{Tuple{Tuple{Int64, Int64}, NamedTuple{(:b, :a), Tuple{Int64, Int64}}}}; cols::Symbol, promote::Bool)
@ DataFrames ~/work/DataFrames.jl/DataFrames.jl/src/dataframe/insertion.jl:1110
[2] push!(::DataFrame, ::Any, ::Vararg{Any}; cols::Symbol, promote::Bool)
@ DataFrames ~/work/DataFrames.jl/DataFrames.jl/src/dataframe/insertion.jl:1119
[3] push!(::DataFrame, ::Any, ::Any)
@ DataFrames ~/work/DataFrames.jl/DataFrames.jl/src/dataframe/insertion.jl:1119
[4] top-level scope
@ none:1
Expected output:
3×2 DataFrame
Row │ a b
│ Int64 Int64
─────┼──────────────
1 │ 1 2
2 │ 3 4
3 │ 5 6
diff =
Warning: Diff output requires color.
3×2 DataFrame
Row │ a b
│ Int64 Int64
─────┼──────────────
1 │ 1 2
2 │ 3 4
3 │ 5 6ERROR: ArgumentError: Mixing rows with column names and without column names in a single `push!` call is not allowed
Stacktrace:
[1] push!(df::DataFrame, rows::ByRow{Tuple{Tuple{Int64, Int64}, NamedTuple{(:b, :a), Tuple{Int64, Int64}}}}; cols::Symbol, promote::Bool)
@ DataFrames ~/work/DataFrames.jl/DataFrames.jl/src/dataframe/insertion.jl:1110
[2] push!(::DataFrame, ::Any, ::Vararg{Any}; cols::Symbol, promote::Bool)
@ DataFrames ~/work/DataFrames.jl/DataFrames.jl/src/dataframe/insertion.jl:1119
[3] push!(::DataFrame, ::Any, ::Any)
@ DataFrames ~/work/DataFrames.jl/DataFrames.jl/src/dataframe/insertion.jl:1119
[4] top-level scope
@ none:1
|
Documentation:
src/dataframe/insertion.jl#L563
doctest failure in ~/work/DataFrames.jl/DataFrames.jl/src/dataframe/insertion.jl:563-641
```jldoctest
julia> df = DataFrame(A='a':'c', B=1:3)
3×2 DataFrame
Row │ A B
│ Char Int64
─────┼─────────────
1 │ a 1
2 │ b 2
3 │ c 3
julia> pushfirst!(df, (true, false), promote=true)
4×2 DataFrame
Row │ A B
│ Any Int64
─────┼─────────────
1 │ true 0
2 │ a 1
3 │ b 2
4 │ c 3
julia> pushfirst!(df, df[1, :])
5×2 DataFrame
Row │ A B
│ Any Int64
─────┼─────────────
1 │ true 0
2 │ true 0
3 │ a 1
4 │ b 2
5 │ c 3
julia> pushfirst!(df, (C="something", A=11, B=12), cols=:intersect)
6×2 DataFrame
Row │ A B
│ Any Int64
─────┼─────────────
1 │ 11 12
2 │ true 0
3 │ true 0
4 │ a 1
5 │ b 2
6 │ c 3
julia> pushfirst!(df, Dict(:A=>1.0, :C=>1.0), cols=:union)
7×3 DataFrame
Row │ A B C
│ Any Int64? Float64?
─────┼──────────────────────────
1 │ 1.0 missing 1.0
2 │ 11 12 missing
3 │ true 0 missing
4 │ true 0 missing
5 │ a 1 missing
6 │ b 2 missing
7 │ c 3 missing
julia> pushfirst!(df, NamedTuple(), cols=:subset)
8×3 DataFrame
Row │ A B C
│ Any Int64? Float64?
─────┼─────────────────────────────
1 │ missing missing missing
2 │ 1.0 missing 1.0
3 │ 11 12 missing
4 │ true 0 missing
5 │ true 0 missing
6 │ a 1 missing
7 │ b 2 missing
8 │ c 3 missing
julia> pushfirst!(DataFrame(a=1, b=2), (3, 4), (b=6, a=5))
3×2 DataFrame
Row │ a b
│ Int64 Int64
─────┼──────────────
1 │ 3 4
2 │ 5 6
3 │ 1 2
```
Subexpression:
pushfirst!(DataFrame(a=1, b=2), (3, 4), (b=6, a=5))
Evaluated output:
ERROR: ArgumentError: Mixing rows with column names and without column names in a single `push!` call is not allowed
Stacktrace:
[1] pushfirst!(df::DataFrame, rows::ByRow{Tuple{Tuple{Int64, Int64}, NamedTuple{(:b, :a), Tuple{Int64, Int64}}}}; cols::Symbol, promote::Bool)
@ DataFrames ~/work/DataFrames.jl/DataFrames.jl/src/dataframe/insertion.jl:1129
[2] pushfirst!(::DataFrame, ::Any, ::Vararg{Any}; cols::Symbol, promote::Bool)
@ DataFrames ~/work/DataFrames.jl/DataFrames.jl/src/dataframe/insertion.jl:1138
[3] pushfirst!(::DataFrame, ::Any, ::Any)
@ DataFrames ~/work/DataFrames.jl/DataFrames.jl/src/dataframe/insertion.jl:1138
[4] top-level scope
@ none:1
Expected output:
3×2 DataFrame
Row │ a b
│ Int64 Int64
─────┼──────────────
1 │ 3 4
2 │ 5 6
3 │ 1 2
diff =
Warning: Diff output requires color.
3×2 DataFrame
Row │ a b
│ Int64 Int64
─────┼──────────────
1 │ 3 4
2 │ 5 6
3 │ 1 2ERROR: ArgumentError: Mixing rows with column names and without column names in a single `push!` call is not allowed
Stacktrace:
[1] pushfirst!(df::DataFrame, rows::ByRow{Tuple{Tuple{Int64, Int64}, NamedTuple{(:b, :a), Tuple{Int64, Int64}}}}; cols::Symbol, promote::Bool)
@ DataFrames ~/work/DataFrames.jl/DataFrames.jl/src/dataframe/insertion.jl:1129
[2] pushfirst!(::DataFrame, ::Any, ::Vararg{Any}; cols::Symbol, promote::Bool)
@ DataFrames ~/work/DataFrames.jl/DataFrames.jl/src/dataframe/insertion.jl:1138
[3] pushfirst!(::DataFrame, ::Any, ::Any)
@ DataFrames ~/work/DataFrames.jl/DataFrames.jl/src/dataframe/insertion.jl:1138
[4] top-level scope
@ none:1
|
Documentation
Process completed with exit code 1.
|
Julia 1 - ubuntu-latest - x64 - pull_request
Process completed with exit code 1.
|
Julia nightly - ubuntu-latest - x64 - pull_request
Process completed with exit code 1.
|
Julia 1.6 - ubuntu-latest - x64 - pull_request
Process completed with exit code 1.
|
Julia 1 - windows-latest - x86 - pull_request
Process completed with exit code 1.
|
DEPRECATION WARNING
julia-actions/julia-buildpkg@master will no longer receive updates and will start to error in the future. Please use version tags like julia-actions/julia-buildpkg@v1 or commit SHAs in your workflows!
|
Documentation
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
DEPRECATION WARNING
julia-actions/julia-buildpkg@master will no longer receive updates and will start to error in the future. Please use version tags like julia-actions/julia-buildpkg@v1 or commit SHAs in your workflows!
|
Julia 1 - ubuntu-latest - x64 - pull_request
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
DEPRECATION WARNING
julia-actions/julia-buildpkg@master will no longer receive updates and will start to error in the future. Please use version tags like julia-actions/julia-buildpkg@v1 or commit SHAs in your workflows!
|
Julia nightly - ubuntu-latest - x64 - pull_request
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
DEPRECATION WARNING
julia-actions/julia-buildpkg@master will no longer receive updates and will start to error in the future. Please use version tags like julia-actions/julia-buildpkg@v1 or commit SHAs in your workflows!
|
Julia 1.6 - ubuntu-latest - x64 - pull_request
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
DEPRECATION WARNING
julia-actions/julia-buildpkg@master will no longer receive updates and will start to error in the future. Please use version tags like julia-actions/julia-buildpkg@v1 or commit SHAs in your workflows!
|
Julia 1 - windows-latest - x86 - pull_request
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|