[Haskell-cafe] Sneaking haskell in the workplace -- cleaning csv files

Tomasz Zielonka tomasz.zielonka at gmail.com
Sat Jun 16 02:49:44 EDT 2007


On Fri, Jun 15, 2007 at 11:31:36PM +0100, Jim Burton wrote:
> I think that would only work if there was one column per line...I didn't 
> make it clear that as well as being comma separated, the delimiter is 
> around each column, of which there are several on a line so if the 
> delimiter is ~ a file might look like:
> 
> ~sdlkfj~, ~dsdkjf~ #eo row1
> ~sdf
> dfkj~, ~dfsd~      #eo row 2

It would be easier to experiment if you could provide us with an
example input file. If you are worried about revealing sensitive
information, you can change all characters other then newline,
~ and , to "A"s, for example. An accompanying output file, for checking
correctness, would be even nicer.

Best regards
Tomek


More information about the Haskell-Cafe mailing list