Welcome! Please see the About page for a little more info on how this works.

+2 votes
in Printing by
I suggest adding the ability to rename columns in {{clojure.pprint/print-table}}, with the following interface:


(print-table [[:b "column b"] [:a "a"]]
                 [{:a 1 :b {:a 'is-a} :c ["hi" "there"]}
                  {:b 5 :a 7 :c "dog" :d -700}])

|  column b |  a |
|-----------+----|
| {:a is-a} |  1 |
|         5 |  7 |

4 Answers

0 votes
by

Comment made by: aviad

patch

0 votes
by

Comment made by: aviad

Any chance of seeing this make it into clojure before the patch turn 3? Closing as "wontfix" is also a legit move, imo (just not the one I hope is made)

0 votes
by

Comment made by: jafingerhut

I am not a decision maker here -- just an observer of decisions made. There are Clojure libraries like Doric (link: 1) and at least one other I am forgetting right now that may be open to changing more quickly in this regard, or may even do what you want already.

I 100% understand the desire for things built into Clojure to do more of what you want, and that they are then available to all Clojure users without having to take on a dependency. This ticket has been categorized as a Feature, which unless it is a feature the Clojure core team is working on (e.g. spec), tends to get low priority. They also tend not to decline tickets unless they are pretty certain they will never do it, instead leaving them open.

(link: 1) https://github.com/joegallo/doric

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJ-1871 (reported by aviad)
...