bug-datamash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-datamash] a problem with transpose function of datamash


From: xiao jianfeng
Subject: [Bug-datamash] a problem with transpose function of datamash
Date: Fri, 7 Nov 2014 14:09:34 +0800

Dear maintainer of datamash,

I just came across datamash a few weeks ago, and I think it is really a fantastic tool to work with column data files.

However, I found a problem with the transpose function of datamash, and I don't know if it is a bug or a feature.

$ printf "1\t2\t3\ta\n4\t5\t\tb\n6\t7\t8\tc\n"
1       2       3       a
4       5               b
6       7       8       c
$ printf "1\t2\t3\ta\n4\t5\t\tb\n6\t7\t8\tc\n" | datamash transpose --no-strict
1       4       6
2       5       7
3       N/A     8
a       N/A     c

It is very common that there are blank field in the middle of a row in a data file. But as you can see from above, all those fields after the blank field will be "NA" in the output. I'm not sure if it is intended to do so, but I think a better output could be as below where fields after a blank field are preserved in the output:

1       4       6
2       5       7
3       N/A     8
a       b       c

Please let me know how do you think.

Thanks again for your work in datamash.

Best Regards,
Jianfeng


reply via email to

[Prev in Thread] Current Thread [Next in Thread]