rocketlaunchr / dataframe-go

DataFrames for Go: For statistics, machine-learning, and data manipulation/exploration
Other
1.16k stars 93 forks source link

Export to Parquet example #51

Closed CeciliaCoelho closed 3 years ago

CeciliaCoelho commented 3 years ago

Can someone give me an example of how to write the code to export a dataframe to a parquet file (couldn't find one anywhere)? I have no idea how to define the writer inside the ExportToParquet. Knowing that i have a dataframe df, i have this code inside main:

ctx := context.Background()
w, err := os.Create("output.parquet")
exports.ExportToParquet(ctx, writer.NewParquetFromWriter(w, df, 4))

Getting this error: image

Thanks again!

pjebs commented 3 years ago

exports.ExportToParquet(ctx, w, df)