Created
October 8, 2021 14:30
-
-
Save eirikbrandsaas/fde9cdd1b622c618954cb0d74ae44ef3 to your computer and use it in GitHub Desktop.
Memory issue with Dataframes.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using DataFrames | |
function inner_df(Nrow,Ncol) | |
df = DataFrame(rand(Nrow,Ncol),:auto) | |
end | |
function outer_df(N) | |
Nrow=76 | |
Ncol=21 | |
df=DataFrame(rand(0,Ncol),:auto) | |
for i = 1:N | |
append!(df,inner_df(Nrow,Ncol)) | |
end | |
return df | |
end | |
function iterate(Niter) | |
for i =1:Niter | |
println(i) | |
@time pan = outer_df(1000*10*10) | |
end | |
end | |
iterate(10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment