@@ -4171,7 +4171,7 @@ end
4171
4171
# eachindex on DataFrame
4172
4172
@test combine (df, eachindex) == DataFrame (eachindex= 1 : 6 )
4173
4173
@test isequal_coltyped (combine (DataFrame (), eachindex),
4174
- DataFrame (eachindex= Int[] ))
4174
+ DataFrame (eachindex= Base . OneTo ( 0 ), copycols = false ))
4175
4175
4176
4176
# Disallowed operations
4177
4177
@test_throws ArgumentError groupindices (df)
@@ -4248,14 +4248,16 @@ end
4248
4248
DataFrame (x = df. x, id = df. id, eachindex = 1 : 6 )
4249
4249
df = view (df, [], :)
4250
4250
df2 = combine (df, eachindex)
4251
- @test isequal_coltyped (df2, DataFrame (eachindex = Int[] ))
4251
+ @test isequal_coltyped (df2, DataFrame (eachindex = Base . OneTo ( 0 ), copycols = false ))
4252
4252
@test isequal_coltyped (df2, combine (eachindex, df))
4253
- @test isequal_coltyped (df2, rename (combine (df, eachindex => :a ), :a => :eachindex ))
4253
+ @test isequal_coltyped (df2, rename! (combine (df, eachindex => :a ), :a => :eachindex ))
4254
+ @test isequal_coltyped (copy (df2), rename (combine (df, eachindex => :a ), :a => :eachindex ))
4254
4255
4255
4256
df2 = transform (df, eachindex)
4256
- @test isequal_coltyped (df2, DataFrame (x = Int[], id = Int[], eachindex = Int[] ))
4257
+ @test isequal_coltyped (df2, DataFrame (x = Int[], id = Int[], eachindex = Base . OneTo ( 0 ), copycols = false ))
4257
4258
@test isequal_coltyped (df2, transform (eachindex, df))
4258
- @test isequal_coltyped (df2, rename (transform (df, eachindex => :a ), :a => :eachindex ))
4259
+ @test isequal_coltyped (df2, rename! (transform (df, eachindex => :a ), :a => :eachindex ))
4260
+ @test isequal_coltyped (copy (df2), rename (transform (df, eachindex => :a ), :a => :eachindex ))
4259
4261
end
4260
4262
4261
4263
@testset " fillfirst! correctness tests" begin
0 commit comments