CSV.jl icon indicating copy to clipboard operation
CSV.jl copied to clipboard

CSV.Chunks splits file into uneven chunks

Open aris-mav opened this issue 1 year ago • 0 comments

In the following example the "a" variable does not have a consistent size.

using CSV, DataFrames

number_of_lines = 10^6
CSV.write("data.csv", DataFrame(rand(number_of_lines, 10), :auto))

steps = 10

@time for chunk in CSV.Chunks("data.csv"; ntasks=steps)
    a = chunk |> DataFrame
    display(size((a)))
end

Please also have a look at this discourse post, for context.

aris-mav avatar Feb 13 '24 15:02 aris-mav