cjdoris / ARFFFiles.jl

Load and save ARFF files
MIT License
5 stars 2 forks source link

ARFFFiles.jl

Load and save ARFF (Attribute Relation File Format) files.

Integrated into Tables.jl for easily converting to your favourite table types.

Install

] add ARFFFiles

Quick start

To load an ARFF file as a DataFrame:

using ARFFFiles, DataFrames
df = ARFFFiles.load(DataFrame, "mytable.arff")

Replace DataFrame with your favourite table type, or leave it out to get an ARFFTable.

To save any Tables.jl-compatible table:

using ARFFFiles
ARFFFiles.save("mytable.arff", df)

Loading

Types. Numbers load as Float64, strings as String, dates as DateTime, nominals as CategoricalValue{String} (from CategoricalArrays) and relationals as ARFFTable.

Keyword options.

Saving

Types. Real is saved as numeric, AbstractString as string, DateTime and Date as date, and CategoricalValue{<:AbstractString} as nominal.

Keyword options.