Skip to content

Instantly share code, notes, and snippets.

@eirikbrandsaas
Created October 8, 2021 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eirikbrandsaas/fde9cdd1b622c618954cb0d74ae44ef3 to your computer and use it in GitHub Desktop.
Save eirikbrandsaas/fde9cdd1b622c618954cb0d74ae44ef3 to your computer and use it in GitHub Desktop.
Memory issue with Dataframes.jl
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