Converting CSV to Parquet in Julia

oo92
Tue, 16 Mar 2021 19:13:10 +0000
New to Julia

Hi.

I have a simple dataframe that I want to convert to parquet. This is my attempt:

begin
	df = CSV.read("/home/onur/julia-assignment/temp.csv", DataFrame)
	prq = Parquet.File(df)
end

But this is the error I’m getting:

MethodError: no method matching Parquet.File(::DataFrames.DataFrame)

Closest candidates are:

Parquet.File(::Any, !Matched::Any, !Matched::Any, !Matched::Any, !Matched::Any) at /home/onur/.julia/packages/Parquet/h8mm5/src/reader.jl:54

Parquet.File(!Matched::String, !Matched::IOStream, !Matched::Parquet.PAR2.FileMetaData, !Matched::Parquet.Schema, !Matched::Parquet.PageLRU) at /home/onur/.julia/packages/Parquet/h8mm5/src/reader.jl:54

Parquet.File(!Matched::AbstractString; map_logical_types) at /home/onur/.julia/packages/Parquet/h8mm5/src/reader.jl:61

How can I open a CSV file as Parquet?

23 posts - 6 participants