Re: [Jprogramming] dsv question

2022-08-23 Thread Ric Sherlock
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

Re: [Jprogramming] dsv question

2022-08-23 Thread 'Kenneth Lettow' via Programming
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,

Re: [Jprogramming] dsv question

2022-08-23 Thread Raul Miller
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

[Jprogramming] dsv question

2022-08-23 Thread Pawel Jakubas
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 ┌──