scipy.io.arff.

MetaData#

class scipy.io.arff.MetaData(rel, attr)[source]#

Small container to keep useful information on an ARFF dataset.

Knows about attributes names and types.

Parameters:
relstr

Name of the relation.

attrlist of Attribute

Attributes of the dataset.

Methods

names()

Return the list of attribute names.

types()

Return the list of attribute types.

Notes

Also maintains the list of attributes in order, i.e., doing for i in meta, where meta is an instance of MetaData, will return the different attribute names in the order they were defined.

Array API Standard Support

MetaData is not in-scope for support of Python Array API Standard compatible backends other than NumPy.

See Support for the array API standard for more information.

Examples

data, meta = loadarff('iris.arff')
# This will print the attributes names of the iris.arff dataset
for i in meta:
    print(i)
# This works too
meta.names()
# Getting attribute type
types = meta.types()