commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: [CSV] Headers and the first record
Date Wed, 31 Jul 2013 20:59:58 GMT
On Wed, Jul 31, 2013 at 4:38 PM, Mark Fortner <phidias51@gmail.com> wrote:

> Hi Gary,
>
>
> > This does not look like a classic CSV file.
>
>
> I guess it depends on what your definition of "classic" is. :-)  This is
> pretty typical for most drug discovery companies.
>
>
> > It sounds like your files contain different sections in different
> formats.
> >
>
> True.
>
>
> >
> > In its current state, commons-csv might not be right for you. What does
> the
> > rest of the file look like?
>
>
> The data section looks similar to this.
>
>                   Erlotinib - Run 1                      Erlotinib - Run 2
> Target       1uM 10 uM 100 uM 1nM         1uM 10 uM 100 uM 1nM
> BRCA1       0.01  0.001  0.0001 0.00001   0.01  0.001  0.0001 0.00001
> BRCA2       0.2    0.002  0.0002 0.00002   0.2    0.002  0.0002 0.00002
>
>
>
Hm... so it looks like you have a couple of rows that each have a different
format.

For some rows, the format has the header and it's value on the same line:

Date: 12/10/13
Protocol: Selectivity Profile 1        Instrument Name: Gandalf
Scientist: John Smith

Which is different from the 'usual' column we see. You format is more like
a spreadsheet than a CSV file.

Nonetheless, we would need to extend our current feature set to accommodate
this format.

I could see the client code looking like this:

// row one is a key: value pair
format.addKeyValueRow(1, ":");

// row two is 2 key: value pairs, separated by a tab
format.addKeyValueRow(2, ":", "\t"); // 2 pairs

The args should also be a format object of some kind, like we have a
CSVFormat object now.

This seems out of scope for 1.0 if we are itching to get 1.0 out the door.

Gary

Regards,
>
> Mark
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message