Discussion:
.arff file
Les 5 en Or
2012-12-16 21:54:03 UTC
Permalink
hi there!

want to convert a database file from .arff to .csv on the terminal since I use a mac OX.
Any clue?

BR, Etoiles
Amarendra Godbole
2012-12-16 22:55:14 UTC
Permalink
How does the .arff look like?

-ag

--
pl. excuse brevity and possible typos, sent from a tiny device.
Post by Les 5 en Or
hi there!
want to convert a database file from .arff to .csv on the terminal since I use a mac OX.
Any clue?
BR, Etoiles
------------------------------------
--
Yahoo! Groups Links
Cameron Simpson
2012-12-17 00:02:42 UTC
Permalink
On 16Dec2012 14:55, Amarendra Godbole <***@symantec.com> wrote:
| On Dec 16, 2012, at 2:54 PM, "Les 5 en Or" <quintior-en-***@hotmail.com> wrote:
| > want to convert a database file from .arff to .csv on the terminal since I use a mac OX.
| > Any clue?
|
| How does the .arff look like?

Might be one of these:

http://en.wikipedia.org/wiki/Attribute-Relation_File_Format

Still, some sample input data would be nice. Desired output data format
would be good too.
--
Cameron Simpson <***@zip.com.au>

Wouldn't it be great if the insurance company would fix your bike to the tune
of $3300, then have an adjuster escort you and supervise while you inflict
$3300 worth of non-insurable damage to his truck?
- Dave Svoboda, ***@void.rtsg.mot.com
Tim Chase
2012-12-17 19:26:38 UTC
Permalink
Post by Les 5 en Or
want to convert a database file from .arff to .csv on the
terminal since I use a mac OX. Any clue?
As others have mentioned, some sample data would be most helpful.

My initial reaction based on my searches for .arff format
information suggest that it's a bad idea to try it with sed unless
you have tight control over the input file. The .arff docs I read
suggest that it's possible to have things like missing fields
("sparse records"), and that there's additional metadata that might
be stored in the header.

I'd likely start with [1] since I'm a Python programmer (there might
be something similar if you're a Perl coder), using the stdlib "csv"
module to create output instead of the SQL Alchemy. With some
sample data to play with, I'd even be willing to take a crack at
tweaking that Python code to spit out CSV.

-tkc


[1]
http://code.activestate.com/recipes/440533/

Loading...