|
From: | Assaf Gordon |
Subject: | Re: [Bug-datamash] Op to just copy column verbatim? |
Date: | Tue, 3 Sep 2019 00:10:53 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
Hello, On 2019-08-29 1:57 a.m., Torsten Seemann wrote:
Thanks for maintaining datamash, it has proved useful in our work, esp to avoid R / Pandas for simple cases.
Thank you for the kind words. This is exactly my purpose in developing "datamash".
Today I went to do what i thought would be a very simple thing. I wanted to do a "named column cut" of a TSV file. Like unix cut -f1,3 but with named columns and reordering. But i could not find an 'op' to select/print/cut a column as is?*name,age,country* john,43,uk aaron,21,usa bruce,33,au /% datamash -H cut country,name/ *country,name* uk,john usa,aaron au,bruce
Excellent idea. The common solution is "use awk", but that indeed solves only the reordering, not the named columns. I've added this feature in git, here: https://git.savannah.gnu.org/cgit/datamash.git/commit/?id=c6f15fd6df6a0ce418bbc834148a65079ecaee89 This will be included in the next release (version 1.5), coming very soon.(as a reminder, there's also the "--full" option if one wants all input fields in addition to the calculated operations).
regards, - assaf
[Prev in Thread] | Current Thread | [Next in Thread] |