Skip to main content

ARFF Format

Read Weka ARFF (Attribute-Relation File Format) datasets as flat attribute dictionaries.

Overview

PropertyValue
Format idarff
ClassARFFIterable
Extensions.arff
ReadYes
WriteNo
Extraarff (liac-arff)
Maturitystable

Record shape

Attribute names become keys; missing values (?) are None. The relation name is included as _relation:

{"outlook": "sunny", "temperature": 85, "play": "no", "_relation": "weather"}

Sparse ARFF rows are densified before yield. The full file is loaded into memory.

Usage

from iterable import open_iterable

with open_iterable("weather.arff") as source:
for row in source:
print(row)

Install with pip install iterabledata[arff].

See also