<div dir="auto">Hi,<div dir="auto"><br></div><div dir="auto">I would probably use Apache Pig Latin for that. About 3 lines of pig code.</div><div dir="auto">1) load ...</div><div dir="auto">2) group ... </div><div dir="auto">3) count ...</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Another option could be Jupyter notebook.</div><div dir="auto"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 5 Jan 2018 18:13, "John Levin via GLLUG" <<a href="mailto:gllug@mailman.lug.org.uk">gllug@mailman.lug.org.uk</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear list,<br>
<br>
I'm having a bad google day, and am not sure what terms to search on, so I hope the list will point me in the right direction.<br>
<br>
I have a number of csv files (of c18th imprisoned debtors). There are three important columns: gender, prison, trade. What I want is a program or script that will simply digest each column and relate them to each other, producing something along the lines of:<br>
There are 200 weavers.<br>
There are 190 male weavers.<br>
There are 20 weavers in Norwich Castle.<br>
There are 18 male weavers in Norwich Castle.<br>
etc.<br>
<br>
This strikes me as a very obvious need, but aside from fantastically complex apps like SPSS (which in any case, doesn't seem to have a simple way of doing this) I have not found anything that satisfies it.<br>
<br>
Very happy to try writing some bash script to do this, but am not sure where to start. CSVkit or suchlike?<br>
<br>
Thanks in advance,<br>
<br>
John<br>
<br>
-- <br>
John Levin<br>
<a href="http://www.anterotesis.com" rel="noreferrer" target="_blank">http://www.anterotesis.com</a><br>
<a href="http://twitter.com/anterotesis" rel="noreferrer" target="_blank">http://twitter.com/anterotesis</a><br>
<br>
-- <br>
GLLUG mailing list<br>
<a href="mailto:GLLUG@mailman.lug.org.uk" target="_blank">GLLUG@mailman.lug.org.uk</a><br>
<a href="https://mailman.lug.org.uk/mailman/listinfo/gllug" rel="noreferrer" target="_blank">https://mailman.lug.org.uk/mai<wbr>lman/listinfo/gllug</a></blockquote></div></div>