CSV like file format featured recently in Daily Python URL?
EP
EP at zomething.com
Thu Oct 6 11:44:57 EDT 2005
> From: Alex Willmer <alex at moreati.org.uk> inquired
> I'm trying to track down the name of a file format and python module,
> that was featured in the Daily Python URL some time in the last month
> or
> two.
>
> The format was ASCII with a multiline header defining types for the
> comma seperated column data below. It may have had the capability to
> store multiple tables in one file. There was news on the homepage that
> an alternate 'no data here' syntax was also supported.
>
> An example file had vaguely this structure:
>
> columnname as datatype
> columnname as datatype
> columnname as datatype
> columnname as datatype
>
> data,data,data,data
> data,"other data",data,data
> data,data,"",data
Was it something like ARFF? http://www.cs.waikato.ac.nz/~ml/weka/arff.html
Google "ARFF Python": http://www.google.com/search?q=arff+python
-----------------------------------------------------
% 1. Title: Iris Plants Database
%
% 2. Sources:
% (a) Creator: R.A. Fisher
% (b) Donor: Michael Marshall (MARSHALL%PLU at io.arc.nasa.gov)
% (c) Date: July, 1988
%
@RELATION iris
@ATTRIBUTE sepallength NUMERIC
@ATTRIBUTE sepalwidth NUMERIC
@ATTRIBUTE petallength NUMERIC
@ATTRIBUTE petalwidth NUMERIC
@ATTRIBUTE class {Iris-setosa,Iris-versicolor,Iris-virginica}
The Data of the ARFF file looks like the following:
@DATA
5.1,3.5,1.4,0.2,Iris-setosa
4.9,3.0,1.4,0.2,Iris-setosa
4.7,3.2,1.3,0.2,Iris-setosa
4.6,3.1,1.5,0.2,Iris-setosa
5.0,3.6,1.4,0.2,Iris-setosa
5.4,3.9,1.7,0.4,Iris-setosa
4.6,3.4,1.4,0.3,Iris-setosa
5.0,3.4,1.5,0.2,Iris-setosa
4.4,2.9,1.4,0.2,Iris-setosa
4.9,3.1,1.5,0.1,Iris-setosa
Lines that begin with a % are comments. The @RELATION, @ATTRIBUTE and @DATA declarations are case insensitive.
---------------------------------------------------------------------------------------------------------
More information about the Python-list
mailing list