Re: .arff file

Tim Chase <[email protected]>
Newsgroups gmane.editors.sed.user
Message-ID <[email protected]>
On 12/16/12 15:54, Les 5 en Or wrote:
> 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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.