scipy.io.arff.

元数据#

class scipy.io.arff.MetaData(rel, attr)[源代码][源代码]#

小型容器,用于保存ARFF数据集的有用信息。

了解属性的名称和类型。

方法

names()

返回属性名称列表。

types()

返回属性类型的列表。

注释

同时维护属性列表的顺序,即,执行 for i in meta,其中 meta 是 MetaData 的一个实例,将按定义顺序返回不同的属性名称。

示例

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()