(thread-last
table
(seq-group-by (lambda (r) (nth column r)))
(seq-map (lambda (r) (list (car r) (seq-count #'identity (cdr r)))))
(seq-sort-by (lambda (r) (nth 1 r)) #'>)
)
- This will group by the column you give it and count how many are in each group.
#+name: count-columns
#+begin_src elisp :var table="" :var column=""
(thread-last
table
(seq-group-by (lambda (r) (nth column r)))
(seq-map (lambda (r) (list (car r) (seq-count #'identity (cdr r)))))
Comment too long. Click here to view the full text.