Displaying a parquet file in Arrow

oo92
Wed, 17 Mar 2021 17:23:36 +0000
New to Julia

Hi.

I am trying to add a Parquet file into Arrow. I tried to follow the Arrow.jl docs and implement it like this:

begin
	df = CSV.read("/home/onur/julia-assignment/temp.csv", DataFrame)
	file = file = "/home/onur/julia-assignment/temp.parquet"
	table = Arrow.write(file)
	write_parquet(file, df)
end

I converted a CSV file to parquet and then brought it into Arrow. So when I try to get the dates and countries columns from my parquet file inside Arrow:

begin
	dates = names(table)[5:end]
	countries = unique(table[:, :"Country/Region"])
end

I get a MethodError:

MethodError: no method matching names(::String)

Closest candidates are:

names(!Matched::DataFrames.Index) at /home/onur/.julia/packages/DataFrames/oQ5c7/src/other/index.jl:34

names(!Matched::Module; all, imported) at reflection.jl:98

names(!Matched::DataFrames.SubIndex) at /home/onur/.julia/packages/DataFrames/oQ5c7/src/other/index.jl:425

...

My goal is to convert a CSV to Parquet, bring the Parquet file into Arrow and perform statistics and data analysis.

8 posts - 4 participants