http://code.google.com/p/arff/
http://code.google.com/p/arff/wiki/Documentation
Usage:
>>> import arff
>>> for row in arff.load('example.arff'):
... print(row.hair_color)
... print(row[-1])
...
>>> print(list(arff.load('example.arff')))
[[Row(hair_color='blonde', age=17.2, patno=1),
Row(hair_color='blue', age=27.2, patno=2),
Row(hair_color='blue', age=18.2, patno=3)]
Where this is the example file:
@relation diabetics_data
@attribute hair_color {blonde, black, blue}
@attribute age real
@attribute patno integer
@data
blonde, 17.2, 1
blue, 27.2, 2
blue, 18.2, 3
-----
>>> data = [[1,2,'a'], [3, 4, 'john']]
>>> arff.dump('result.arff', data, relation="whatever", names=['num', 'day', 'title'])
results in the creation of this file:
@relation whatever
@attribute num integer
@attribute day integer
@attribute title string
@data
1,2,'a'
3,4,'john'
-----
supports arff types: numeric, integer, real, string
supports python types: int, str, float
in the future: dates
Tested on python 2.7 and 3.2
License: BSD, do what you wish with this. Could be awesome to hear if you found
it useful and/or you have suggestions. ubershmekel at gmail
Based on http://weka.wikispaces.com/ARFF+%28stable+version%29
Metadata
Release files for arff 0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| arff-0.9.tar.gz | 4.7 kB | Without provenance | Details |
Release files / arff-0.9.tar.gz
| Download URL | arff-0.9.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4013e25a01a88a08e33aae60ec5c66deba0565709d056d2c20819d032fdd1eb
|
|
BLAKE2b-256 checksum How to use checksums |
50de62d4446c5a6e459052c2f2d9490c370ddb6abc0766547b4cef585913598d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for arff 0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.