scipy.io.arff.MetaData¶
- class scipy.io.arff.MetaData(rel, attr)[源代码]¶
保存有关ARFF数据集的有用信息的小容器。
了解属性、名称和类型。
注意事项
还按顺序维护属性列表,即,在元数据中对i执行操作(其中,元数据是元数据的实例)将按不同属性名称的定义顺序返回不同的属性名称。
示例
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()
方法:
names
\()返回属性名称列表。
types
\()返回属性类型列表。