Fork me on GitHub
#data-science
<
2017-05-17
>
jsa-aerial00:05:55

core.matrix does have dataframe/dataset capabilities as well.

mikera01:05:00

I've tried to make quite a few features in core.matrix to support good interop with seq and maps e.g.:

mikera01:05:05

=> (use '[clojure.core.matrix.dataset :as ds]) nil => (def d (ds/dataset [:foo :bar] [[1 2] [3 4]])) #'clojure.core.matrix/d => (first (ds/row-maps d)) {:foo 1, :bar 2}

mikera01:05:47

There is also handy functionality for data wranglers like applying a function to a specific column:

mikera01:05:49

=> (pm (ds/emap-column d :foo (partial + 10))) [[:foo :bar] [ 11 2] [ 13 4]]

mikera01:05:41

Encourage people to try out the core.matrix dataset functionality, we've found it quite useful and general in our own projects, so do let me know if you find and issues or send a PR for improvements! Future work might include extending the dataset protocols to directly support things like Spark datasets or JDBC result sets which should be a nice fit for the general abstraction.