Building on the inverted table defns
dfftbl=: {. ,: ifa@}.
tblfdf=: {. , afi@{:
tblfdf dfftbl B
┌──┬──┬──┬─┐
│Id│Name │Job │Status │
├──┼──┼──┼─┤
│3 │Jerry │Unemployed│Married │
├──┼──┼──┼─┤
│6 │Jan │CEO │Marri
Hi Pawel,
I would also check out Roger Hui's great essay on Inverted Tables.
https://code.jsoftware.com/wiki/Essays/Inverted_Table
I use his verbs ifa and afi often.
ifa =: <@(>"1)@|: NB. inverted from atoms
afi =: |:@:(<"_1@>) NB. atoms from inverted
On Tue, Aug 23,
require'tables/dsv'
ex=: ({.,:,each/@:(,:each)@}.) ',' readdsv 'dept.csv'
ex
┌──┬──┬──┐
│deptno│dname │location │
├──┼──┼──┤
│10│Accounting│"New York"│
│20│Research │Dallas│
│30│Sales │Chicago │
│40│Operations│Boston
Thanks for the answers.
And how would you can go from
┌──┬──┬┐
│deptno│dname │location│
├──┼──┼┤
│10│Accounting│New York│
│20│Research │Dallas │
│30│Sales │Chicago │
│40│Operations│Boston │
└──┴──┴┘
to
┌──