diff --git a/deps.edn b/deps.edn index 10552db..0fd4e84 100644 --- a/deps.edn +++ b/deps.edn @@ -1,7 +1,7 @@ {:extra-paths ["data"] :deps {org.clojure/clojure {:mvn/version "1.11.1"} techascent/tech.ml.dataset {:mvn/version "7.021"}} - :aliases {:dev {:extra-deps {org.scicloj/clay {:mvn/version "2-alpha59"} + :aliases {:dev {:extra-deps {org.scicloj/clay {:mvn/version "2-alpha60"} org.scicloj/note-to-test {:mvn/version "1-alpha7"}}} - :test {:extra-deps {org.scicloj/clay {:mvn/version "2-alpha59"} + :test {:extra-deps {org.scicloj/clay {:mvn/version "2-alpha60"} org.scicloj/note-to-test {:mvn/version "1-alpha7"}}}}} diff --git a/docs/index.html b/docs/index.html index 2a106d6..8f4941d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -305,17 +305,14 @@
require '[tablecloth.api :as tc]
(:as dfn]) '[tech.v3.datatype.functional
nil
def DS (tc/dataset {:V1 (take 9 (cycle [1 2]))
- (:V2 (range 1 10)
- :V3 (take 9 (cycle [0.5 1.0 1.5]))
- :V4 (take 9 (cycle ["A" "B" "C"]))}))
def DS (tc/dataset {:V1 (take 9 (cycle [1 2]))
+ (:V2 (range 1 10)
+ :V3 (take 9 (cycle [0.5 1.0 1.5]))
+ :V4 (take 9 (cycle ["A" "B" "C"]))}))
DS
DS
_unnamed [9 4]:
:A [1 2 3]}) (tc/dataset {
:A [1 2 3]}) (tc/dataset {
_unnamed [3 1]:
:A [3 4 5] :B "X"}) (tc/dataset {
:A [3 4 5] :B "X"}) (tc/dataset {
_unnamed [3 2]:
:a 1 :b [1 2 3]} {:a 2 :b [3 4]}]) (tc/dataset [{
:a 1 :b [1 2 3]} {:a 2 :b [3 4]}]) (tc/dataset [{
_unnamed [2 2]:
:as-columns
-> (map int-array [[1 2] [3 4] [5 6]])
- (into-array)
- (:layout :as-columns})) (tc/dataset {
-> (map int-array [[1 2] [3 4] [5 6]])
+ (into-array)
+ (:layout :as-columns})) (tc/dataset {
:_unnamed [2 3]:
:as-rows
with names
-> (map int-array [[1 2] [3 4] [5 6]])
- (into-array)
- (:layout :as-rows
- (tc/dataset {:column-names [:a :b]}))
-> (map int-array [[1 2] [3 4] [5 6]])
+ (into-array)
+ (:layout :as-rows
+ (tc/dataset {:column-names [:a :b]}))
:_unnamed [3 2]:
Any objects
-> (map to-array [[:a :z] ["ee" "ww"] [9 10]])
- (into-array)
- (:column-names [:a :b :c]
- (tc/dataset {:layout :as-columns}))
-> (map to-array [[:a :z] ["ee" "ww"] [9 10]])
+ (into-array)
+ (:column-names [:a :b :c]
+ (tc/dataset {:layout :as-columns}))
:_unnamed [2 3]:
999 {:single-value-column-name ""
- (tc/dataset :dataset-name "Single value"
- :error-column? false})
999 {:single-value-column-name ""
+ (tc/dataset :dataset-name "Single value"
+ :error-column? false})
Single value [1 1]:
:basic) (tc/info ds
:basic) (tc/info ds
https://vega.github.io/vega-lite/examples/data/seattle-weather.csv :basic info [1 4]:
:columns) (tc/info ds
:columns) (tc/info ds
https://vega.github.io/vega-lite/examples/data/seattle-weather.csv :column info [6 4]:
or
:type/float64) (tc/select-columns DS
:type/float64) (tc/select-columns DS
_unnamed [9 1]:
or
:type/float64) (tc/drop-columns DS
:type/float64) (tc/drop-columns DS
_unnamed [9 3]:
v1 | v2 | [1 2 3] | -java.lang.Object@7c9d7862 | +java.lang.Object@95193e0 | @@ -5820,7 +5817,7 @@
---|
-java.lang.Object@3c0d4f78 +java.lang.Object@30d488dc | @@ -6118,7 +6115,7 @@-java.lang.Object@3c0d4f78 +java.lang.Object@30d488dc | @@ -6212,7 +6209,7 @@
---|
0.47291521 | +0.70943795 | 1 | 0.5 | A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0.14737727 | +0.94786800 | 2 | 1.0 | B | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0.28721546 | +0.44038531 | 3 | 1.5 | C | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0.63607470 | +0.30710737 | 4 | 0.5 | A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0.29764758 | +0.93840914 | 5 | 1.0 | B | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0.47277432 | +0.69026980 | 6 | 1.5 | C | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0.47253894 | +0.16760210 | 7 | 0.5 | A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0.97575288 | +0.36362397 | 8 | 1.0 | B | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0.33625488 | +0.54570127 | 9 | 1.5 | C | @@ -6367,7 +6364,7 @@
:V5 [:r :b] :na) (tc/add-column DS
:V5 [:r :b] :na) (tc/add-column DS
_unnamed [9 5]:
Exception is thrown when :strict
(default) strategy is used and column size is not equal row count
try
- (:V5 [:r :b])
- (tc/add-column DS catch Exception e (str "Exception caught: "(ex-message e)))) (
try
+ (:V5 [:r :b])
+ (tc/add-column DS catch Exception e (str "Exception caught: "(ex-message e)))) (
"Exception caught: Column size (2) should be exactly the same as dataset row count (9). Consider `:cycle` or `:na` strategy."
"Exception caught: Column size (2) should be exactly the same as dataset row count (9). Consider `:cycle` or `:na` strategy."
Tha same applies for grouped dataset
-> DS
- (:V3)
- (tc/group-by :V5 [:r :b] :na)
- (tc/add-column (tc/ungroup))
-> DS
+ (:V3)
+ (tc/group-by :V5 [:r :b] :na)
+ (tc/add-column (tc/ungroup))
_unnamed [9 5]:
1 | -6 | +1 | 0.5 | A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | -3 | +2 | 1.0 | B | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | -8 | +5 | 1.5 | C | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | -7 | +4 | 0.5 | A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | -4 | +7 | 1.0 | B | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | -5 | +3 | 1.5 | C | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | -1 | +6 | 0.5 | A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | -9 | +8 | 1.0 | B | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | -2 | +9 | 1.5 | C |
The same works on grouped dataset
-> DS
- (:V4)
- (tc/group-by :sum-of-numbers
- (tc/map-columns :int64 :float64} :datatype)
- (tc/column-names DS #{fn [& rows]
- (reduce + rows)))
- ( (tc/ungroup))
-> DS
+ (:V4)
+ (tc/group-by :sum-of-numbers
+ (tc/map-columns :int64 :float64} :datatype)
+ (tc/column-names DS #{fn [& rows]
+ (reduce + rows)))
+ ( (tc/ungroup))
_unnamed [9 5]:
1 | -9 | +2 | +6 | 1.5 | C |
1 | -5 | -1.0 | -B | +7 | +0.5 | +A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | -4 | -0.5 | -A | +2 | +1.0 | +B | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | -7 | -0.5 | -A | +2 | +6 | +1.5 | +C | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | -9 | +2 | +6 | 1.5 | C | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | -2 | -1.0 | -B | +4 | +0.5 | +A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | @@ -8505,9 +8502,9 @@|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | -3 | -1.5 | -C | +7 | +0.5 | +A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | @@ -8516,8 +8513,8 @@C | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | -3 | +2 | +6 | 1.5 | C |
1 | +7 | +0.5 | +A | +|
1 | +1 | +0.5 | +A | +|
2 | 8 | 1.0 | @@ -8548,35 +8557,23 @@||
1 | -9 | +3 | 1.5 | C |
1 | -5 | -1.0 | -B | -|
2 | -6 | +9 | 1.5 | C |
2 | -4 | -0.5 | -A | -
Five random, non-repeating rows
:note-to-test/skip
- ^5 {:repeat? false}) (tc/random DS
:note-to-test/skip
+ ^5 {:repeat? false}) (tc/random DS
_unnamed [5 4]:
2 | -6 | -1.5 | -C | +1 | +5 | +1.0 | +B |
1 | -3 | -1.5 | -C | -||||
1 | -7 | 0.5 | A | ||||
1 | -1 | +||||||
2 | +4 | 0.5 | A | ||||
2 | 8 | 1.0 | B | ||||
1 | +7 | +0.5 | +A | +
Five random, with seed
5 {:seed 42}) (tc/random DS
5 {:seed 42}) (tc/random DS
_unnamed [5 4]:
1 | -3 | -1.5 | -C | +2 | +4 | +0.5 | +A | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | @@ -8700,33 +8697,21 @@|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | -9 | -1.5 | -C | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | -4 | -0.5 | -A | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | 7 | 0.5 | A | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | -2 | +8 | 1.0 | B | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | -8 | -1.0 | -B | +1 | +3 | +1.5 | +C | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | @@ -8736,6 +8721,18 @@|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | +9 | +1.5 | +C | +||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | +2 | +1.0 | +B | +||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | 1 | 0.5 | A | @@ -8745,7 +8742,7 @@
most V3 values
:V3 zero? {:desc? false}) (tc/by-rank DS
:V3 zero? {:desc? false}) (tc/by-rank DS
_unnamed [3 4]:
1 | -7 | +1 | 0.5 | A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | -1 | +7 | 0.5 | A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | -7 | +1 | 0.5 | A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | -1 | +7 | 0.5 | A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | -7 | +2 | +4 | 0.5 | A | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | -8 | +2 | 1.0 | B | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | -2 | +1 | +5 | 1.0 | B | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | -2 | +8 | 1.0 | B | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | -8 | +2 | 1.0 | B | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | -6 | +1 | +3 | 1.5 | C | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | -6 | +1 | +9 | 1.5 | C | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | -3 | +9 | 1.5 | C | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | -3 | +9 | 1.5 | C |
Result of aggregating is automatically ungrouped, you can skip this step by stetting :ungroup
option to false
.
-> DS
- (:V3])
- (tc/group-by [take 3 (% :V2))
- (tc/aggregate [#(fn [ds] {:sum-v1 (reduce + (ds :V1))
- (:prod-v3 (reduce * (ds :V3))})] {:default-column-name-prefix "V2-value"
- :ungroup? false}))
-> DS
+ (:V3])
+ (tc/group-by [take 3 (% :V2))
+ (tc/aggregate [#(fn [ds] {:sum-v1 (reduce + (ds :V1))
+ (:prod-v3 (reduce * (ds :V3))})] {:default-column-name-prefix "V2-value"
+ :ungroup? false}))
_unnamed [3 3]:
:V1 :V2 :V3] [#(reduce + %)
- (tc/aggregate-columns DS [reduce max %)
- #(reduce * %)]) #(
:V1 :V2 :V3] [#(reduce + %)
+ (tc/aggregate-columns DS [reduce max %)
+ #(reduce * %)]) #(
_unnamed [1 3]:
-> DS
- (:V4])
- (tc/group-by [:V1 :V2 :V3] #(reduce + %))) (tc/aggregate-columns [
-> DS
+ (:V4])
+ (tc/group-by [:V1 :V2 :V3] #(reduce + %))) (tc/aggregate-columns [
_unnamed [3 4]:
You can also aggregate whole dataset
-> DS
- (:V4)
- (tc/drop-columns reduce + %))) (tc/aggregate-columns #(
-> DS
+ (:V4)
+ (tc/drop-columns reduce + %))) (tc/aggregate-columns #(
_unnamed [1 3]:
:a [:b :c]) (tc/crosstab ctds
:a [:b :c]) (tc/crosstab ctds
_unnamed [2 5]:
:V1 :V2] [:desc :desc]) (tc/order-by DS [
:V1 :V2] [:desc :desc]) (tc/order-by DS [
_unnamed [9 4]:
:V1 :V3] [:desc :asc]) (tc/order-by DS [
:V1 :V3] [:desc :asc]) (tc/order-by DS [
_unnamed [9 4]:
2 | -6 | -1.5 | -C | +8 | +1.0 | +B |
Pack columns into vector
:V4 {:strategy vec}) (tc/unique-by DS
:V4 {:strategy vec}) (tc/unique-by DS
_unnamed [3 3]:
:a :b] :updown) (tc/replace-missing DSm2 [
:a :b] :updown) (tc/replace-missing DSm2 [
_unnamed [15 2]:
"z" [:x :y] {:drop-columns? false
- (tc/join-columns df :missing-subst "NA"
- :separator "_"})
"z" [:x :y] {:drop-columns? false
+ (tc/join-columns df :missing-subst "NA"
+ :separator "_"})
_unnamed [4 3]:
"z" [:x :y] {:drop-columns? false
- (tc/join-columns df :separator "_"})
"z" [:x :y] {:drop-columns? false
+ (tc/join-columns df :separator "_"})
_unnamed [4 3]:
:V1 | +:V2 | +:int-part | +:frac-part | +:V4 | +
---|---|---|---|---|
1 | +1 | +0 | +0.5 | +A | +
2 | +2 | +1 | +0.0 | +B | +
1 | +3 | +1 | +0.5 | +C | +
2 | +4 | +0 | +0.5 | +A | +
1 | +5 | +1 | +0.0 | +B | +
2 | +6 | +1 | +0.5 | +C | +
1 | +7 | +0 | +0.5 | +A | +
2 | +8 | +1 | +0.0 | +B | +
1 | +9 | +1 | +0.5 | +C | +
Source column can be kept
+:V3 [:int-part :frac-part] (fn [^double v]
(tc/separate-column DS int (quot v 1.0))
- [(mod v 1.0)])) (
_unnamed [9 6]:
+:V1 | +:V2 | +:V3 | +:int-part | +:frac-part | +:V4 | +
---|---|---|---|---|---|
1 | +1 | +0.5 | +0 | +0.5 | +A | +
2 | +2 | +1.0 | +1 | +0.0 | +B | +
1 | +3 | +1.5 | +1 | +0.5 | +C | +
2 | +4 | +0.5 | +0 | +0.5 | +A | +
1 | +5 | +1.0 | +1 | +0.0 | +B | +
2 | +6 | +1.5 | +1 | +0.5 | +C | +
1 | +7 | +0.5 | +0 | +0.5 | +A | +
2 | +8 | +1.0 | +1 | +0.0 | +B | +
1 | +9 | +1.5 | +1 | +0.5 | +C | +
We can treat 0
or 0.0
as missing value
:V3 [:int-part :frac-part] (fn [^double v]
+ (tc/separate-column DS int (quot v 1.0))
+ [(mod v 1.0)]) {:missing-subst [0 0.0]}) (
_unnamed [9 5]:
:V2 | :int-part | :frac-part | -:V4 | - - - -|
---|---|---|---|---|
1 | -1 | -0 | -0.5 | -A | -
2 | -2 | -1 | -0.0 | -B | -
1 | -3 | -1 | -0.5 | -C | -
2 | -4 | -0 | -0.5 | -A | -
1 | -5 | -1 | -0.0 | -B | -
2 | -6 | -1 | -0.5 | -C | -
1 | -7 | -0 | -0.5 | -A | -
2 | -8 | -1 | -0.0 | -B | -
1 | -9 | -1 | -0.5 | -C | -
Source column can be kept
-:V3 [:int-part :frac-part] (fn [^double v]
- (tc/separate-column DS int (quot v 1.0))
- [(mod v 1.0)]) {:drop-column? false}) (
_unnamed [9 6]:
-:V1 | -:V2 | -:V3 | -:int-part | -:frac-part | -:V4 | -
---|---|---|---|---|---|
1 | -1 | -0.5 | -0 | -0.5 | -A | -
2 | -2 | -1.0 | -1 | -0.0 | -B | -
1 | -3 | -1.5 | -1 | -0.5 | -C | -
2 | -4 | -0.5 | -0 | -0.5 | -A | -
1 | -5 | -1.0 | -1 | -0.0 | -B | -
2 | -6 | -1.5 | -1 | -0.5 | -C | -
1 | -7 | -0.5 | -0 | -0.5 | -A | -
2 | -8 | -1.0 | -1 | -0.0 | -B | -
1 | -9 | -1.5 | -1 | -0.5 | -C | -
We can treat 0
or 0.0
as missing value
:V3 [:int-part :frac-part] (fn [^double v]
- (tc/separate-column DS int (quot v 1.0))
- [(mod v 1.0)]) {:missing-subst [0 0.0]}) (
_unnamed [9 5]:
-:V1 | -:V2 | -:int-part | -:frac-part | -:V4 | -
---|---|---|---|---|
1 | -1 | -- | 0.5 | -A | -
2 | -2 | -1 | -- | B | -
1 | -3 | -1 | -0.5 | -C | -
2 | -4 | -- | 0.5 | -A | -
1 | -5 | -1 | -- | B | -
2 | -6 | -1 | -0.5 | -C | -
1 | -7 | -- | 0.5 | -A | -
2 | -8 | -1 | -- | B | -
1 | -9 | -1 | -0.5 | -C | -
Works on grouped dataset
--> DS
- (:V4)
- (tc/group-by :V3 [:int-part :fract-part] (fn [^double v]
- (tc/separate-column int (quot v 1.0))
- [(mod v 1.0)]))
- ( (tc/ungroup))
_unnamed [9 5]:
-:V1 | -:V2 | -:int-part | -:fract-part | -:V4 | -
---|---|---|---|---|
1 | -1 | -0 | -0.5 | -A | -
2 | -4 | -0 | -0.5 | -A | -
1 | -7 | -0 | -0.5 | -A | -
2 | -2 | -1 | -0.0 | -B | -
1 | -5 | -1 | -0.0 | -B | -
2 | -8 | -1 | -0.0 | -B | -
1 | -3 | -1 | -0.5 | -C | -
2 | -6 | -1 | -0.5 | -C | -
1 | -9 | -1 | -0.5 | -C | -
Separate using separator returning sequence of maps.
-:V3 (fn [^double v]
- (tc/separate-column DS :int-part (int (quot v 1.0))
- {:fract-part (mod v 1.0)}))
_unnamed [9 5]:
-:V1 | -:V2 | -:int-part | -:fract-part | +:V4 | +
---|---|---|---|---|
1 | +1 | ++ | 0.5 | +A | +
2 | +2 | +1 | ++ | B | +
1 | +3 | +1 | +0.5 | +C | +
2 | +4 | ++ | 0.5 | +A | +
1 | +5 | +1 | ++ | B | +
2 | +6 | +1 | +0.5 | +C | +
1 | +7 | ++ | 0.5 | +A | +
2 | +8 | +1 | ++ | B | +
1 | +9 | +1 | +0.5 | +C | +
Works on grouped dataset
+-> DS
+ (:V4)
+ (tc/group-by :V3 [:int-part :fract-part] (fn [^double v]
+ (tc/separate-column int (quot v 1.0))
+ [(mod v 1.0)]))
+ ( (tc/ungroup))
_unnamed [9 5]:
+:V1 | +:V2 | +:int-part | +:fract-part | +:V4 | +
---|---|---|---|---|
1 | +1 | +0 | +0.5 | +A | +
2 | +4 | +0 | +0.5 | +A | +
1 | +7 | +0 | +0.5 | +A | +
2 | +2 | +1 | +0.0 | +B | +
1 | +5 | +1 | +0.0 | +B | +
2 | +8 | +1 | +0.0 | +B | +
1 | +3 | +1 | +0.5 | +C | +
2 | +6 | +1 | +0.5 | +C | +
1 | +9 | +1 | +0.5 | +C | +
Separate using separator returning sequence of maps.
+:V3 (fn [^double v]
+ (tc/separate-column DS :int-part (int (quot v 1.0))
+ {:fract-part (mod v 1.0)}))
_unnamed [9 5]:
+:V1 | +:V2 | +:int-part | +:fract-part | :V4 |
---|
Keeping all columns
:V3 nil (fn [^double v]
- (tc/separate-column DS :int-part (int (quot v 1.0))
- {:fract-part (mod v 1.0)}) {:drop-column? false})
:V3 nil (fn [^double v]
+ (tc/separate-column DS :int-part (int (quot v 1.0))
+ {:fract-part (mod v 1.0)}) {:drop-column? false})
_unnamed [9 6]:
Droping all colums but separated
:V3 nil (fn [^double v]
- (tc/separate-column DS :int-part (int (quot v 1.0))
- {:fract-part (mod v 1.0)}) {:drop-column? :all})
:V3 nil (fn [^double v]
+ (tc/separate-column DS :int-part (int (quot v 1.0))
+ {:fract-part (mod v 1.0)}) {:drop-column? :all})
_unnamed [9 2]:
Infering column names
:V3 (fn [^double v]
- (tc/separate-column DS int (quot v 1.0)) (mod v 1.0)])) [(
:V3 (fn [^double v]
+ (tc/separate-column DS int (quot v 1.0)) (mod v 1.0)])) [(
_unnamed [9 5]:
-> DSm
- (:joined [:V1 :V2 :V4] {:result-type :seq})
- (tc/join-columns :joined [:v1 :v2 :v4] identity)) (tc/separate-column
-> DSm
+ (:joined [:V1 :V2 :V4] {:result-type :seq})
+ (tc/join-columns :joined [:v1 :v2 :v4] identity)) (tc/separate-column
_unnamed [9 4]:
df-separate2
df-separate2
_unnamed [4 1]:
df-separate3
df-separate3
_unnamed [4 1]:
df-extract
df-extract
_unnamed [5 1]:
:x [:A :B] "\\.") (tc/separate-column df-separate
:x [:A :B] "\\.") (tc/separate-column df-separate
_unnamed [4 2]:
and the other way around:
-> (tc/dataset {0 [0.0 1 2]
- (1 [3.0 4 5]
- :x [:a :b :c]})
- 0 1] :y)) (tc/columns->array-column [
-> (tc/dataset {0 [0.0 1 2]
+ (1 [3.0 4 5]
+ :x [:a :b :c]})
+ 0 1] :y)) (tc/columns->array-column [
_unnamed [3 2]:
:a | -[D@18b15859 | +[D@681a35d0 |
:b | -[D@5c398580 | +[D@3cdf06bf |
:c | -[D@226fdf6f | +[D@1c26fd9a |
Group-by and pack columns into vector
:V3 :V4 :V1]) (tc/fold-by DS [
:V3 :V4 :V1]) (tc/fold-by DS [
_unnamed [6 4]:
or
:V4] set) (tc/fold-by DS [
:V4] set) (tc/fold-by DS [
_unnamed [3 4]:
:V1]) [:V4 :V2 :V3] {:indexes? "vector idx"}) (tc/unroll (tc/fold-by DS [
:V1]) [:V4 :V2 :V3] {:indexes? "vector idx"}) (tc/unroll (tc/fold-by DS [
_unnamed [9 5]:
complement #{"religion"})) (tc/pivot->longer relig-income (
complement #{"religion"})) (tc/pivot->longer relig-income (
data/relig_income.csv [180 3]:
% "wk") {:target-columns :week
- (tc/pivot->longer bilboard #(clojure.string/starts-with? :value-column-name :rank})
% "wk") {:target-columns :week
+ (tc/pivot->longer bilboard #(clojure.string/starts-with? :value-column-name :rank})
data/billboard.csv.gz [5307 5]:
% "new") {:target-columns [:diagnosis :gender :age]
- (tc/pivot->longer who #(clojure.string/starts-with? :splitter #"new_?(.*)_(.)(.*)"
- :value-column-name :count})
% "new") {:target-columns [:diagnosis :gender :age]
+ (tc/pivot->longer who #(clojure.string/starts-with? :splitter #"new_?(.*)_(.)(.*)"
+ :value-column-name :count})
data/who.csv.gz [76046 8]:
complement #{"family"}) {:target-columns [nil :child]
- (tc/pivot->longer family (:splitter "_"
- :datatypes {"gender" :int16}})
complement #{"family"}) {:target-columns [nil :child]
+ (tc/pivot->longer family (:splitter "_"
+ :datatypes {"gender" :int16}})
data/family.csv [9 4]:
:all {:splitter #"(.)(.)"
- (tc/pivot->longer anscombe :target-columns [nil :set]})
:all {:splitter #"(.)(.)"
+ (tc/pivot->longer anscombe :target-columns [nil :set]})
data/anscombe.csv [44 3]:
:note-to-test/skip
- ^def pnl (tc/dataset {:x [1 2 3 4]
- (:a [1 1 0 0]
- :b [0 1 1 1]
- :y1 (repeatedly 4 rand)
- :y2 (repeatedly 4 rand)
- :z1 [3 3 3 3]
- :z2 [-2 -2 -2 -2]}))
:note-to-test/skip
+ ^def pnl (tc/dataset {:x [1 2 3 4]
+ (:a [1 1 0 0]
+ :b [0 1 1 1]
+ :y1 (repeatedly 4 rand)
+ :y2 (repeatedly 4 rand)
+ :z1 [3 3 3 3]
+ :z2 [-2 -2 -2 -2]}))
:note-to-test/skip
- ^ pnl
:note-to-test/skip
+ ^ pnl
_unnamed [4 7]:
1 | 1 | 0 | -0.51057279 | -0.51902054 | +0.20068433 | +0.45972201 | 3 | -2 | @@ -17209,8 +17206,8 @@2 | 1 | 1 | -0.01742715 | -0.35105685 | +0.88315967 | +0.11649110 | 3 | -2 | @@ -17218,8 +17215,8 @@3 | 0 | 1 | -0.36193456 | -0.27369353 | +0.11587452 | +0.57851878 | 3 | -2 | @@ -17227,17 +17224,17 @@4 | 0 | 1 | -0.34991452 | -0.76959514 | +0.35584868 | +0.33325357 | 3 | -2 |
:note-to-test/skip
- ^:y1 :y2 :z1 :z2] {:target-columns [nil :times]
- (tc/pivot->longer pnl [:splitter #":(.)(.)"})
:note-to-test/skip
+ ^:y1 :y2 :z1 :z2] {:target-columns [nil :times]
+ (tc/pivot->longer pnl [:splitter #":(.)(.)"})
_unnamed [8 6]:
1 | 0 | 1 | -0.51057279 | +0.20068433 | 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | 1 | 1 | -0.01742715 | +0.88315967 | 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0 | 1 | 1 | -0.36193456 | +0.11587452 | 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0 | 1 | 1 | -0.34991452 | +0.35584868 | 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | 0 | 2 | -0.51902054 | +0.45972201 | -2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | 1 | 2 | -0.35105685 | +0.11649110 | -2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0 | 1 | 2 | -0.27369353 | +0.57851878 | -2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0 | 1 | 2 | -0.76959514 | +0.33325357 | -2 |
"station" "seen" {:drop-missing? false}) (tc/pivot->wider fish
"station" "seen" {:drop-missing? false}) (tc/pivot->wider fish
data/fish_encounters.csv [19 12]:
Let’s see how many values are for each type of wool
and tension
groups
-> warpbreaks
- ("wool" "tension"])
- (tc/group-by [:n tc/row-count})) (tc/aggregate {
-> warpbreaks
+ ("wool" "tension"])
+ (tc/group-by [:n tc/row-count})) (tc/aggregate {
_unnamed [6 3]:
-> warpbreaks
- ("wool" "tension" "breaks"])
- (tc/reorder-columns ["wool" "breaks" {:fold-fn vec})) (tc/pivot->wider
-> warpbreaks
+ ("wool" "tension" "breaks"])
+ (tc/reorder-columns ["wool" "breaks" {:fold-fn vec})) (tc/pivot->wider
data/warpbreaks.csv [3 3]:
We can also calculate mean (aggreate values)
-> warpbreaks
- ("wool" "tension" "breaks"])
- (tc/reorder-columns ["wool" "breaks" {:fold-fn tech.v3.datatype.functional/mean})) (tc/pivot->wider
-> warpbreaks
+ ("wool" "tension" "breaks"])
+ (tc/reorder-columns ["wool" "breaks" {:fold-fn tech.v3.datatype.functional/mean})) (tc/pivot->wider
data/warpbreaks.csv [3 3]:
"product" "country"] "production") (tc/pivot->wider production [
"product" "country"] "production") (tc/pivot->wider production [
data/production.csv [15 4]:
Joined with custom function
"product" "country"] "production" {:concat-columns-with vec}) (tc/pivot->wider production [
"product" "country"] "production" {:concat-columns-with vec}) (tc/pivot->wider production [
data/production.csv [15 4]:
"variable" ["estimate" "moe"] {:drop-missing? false}) (tc/pivot->wider income
"variable" ["estimate" "moe"] {:drop-missing? false}) (tc/pivot->wider income
data/us_rent_income.csv [52 6]:
Value concatenated by custom function
"variable" ["estimate" "moe"] {:concat-columns-with vec
- (tc/pivot->wider income :concat-value-with vector
- :drop-missing? false})
"variable" ["estimate" "moe"] {:concat-columns-with vec
+ (tc/pivot->wider income :concat-value-with vector
+ :drop-missing? false})
data/us_rent_income.csv [52 6]:
"field" "value" {:drop-missing? false}) (tc/pivot->wider contacts
"field" "value" {:drop-missing? false}) (tc/pivot->wider contacts
data/contacts.csv [3 4]:
Step 1 - convert years column into values
def pop2 (tc/pivot->longer world-bank-pop (map str (range 2000 2018)) {:drop-missing? false
- (:target-columns ["year"]
- :value-column-name "value"}))
def pop2 (tc/pivot->longer world-bank-pop (map str (range 2000 2018)) {:drop-missing? false
+ (:target-columns ["year"]
+ :value-column-name "value"}))
pop2
pop2
data/world_bank_pop.csv.gz [19008 4]:
Step 2 - separate "indicate"
column
def pop3 (tc/separate-column pop2
- ("indicator" ["area" "variable"]
- rest (clojure.string/split % #"\.")))) #(
def pop3 (tc/separate-column pop2
+ ("indicator" ["area" "variable"]
+ rest (clojure.string/split % #"\.")))) #(
pop3
pop3
data/world_bank_pop.csv.gz [19008 5]:
Step 3 - Make columns based on "variable"
values.
"variable" "value" {:drop-missing? false}) (tc/pivot->wider pop3
"variable" "value" {:drop-missing? false}) (tc/pivot->wider pop3
data/world_bank_pop.csv.gz [9504 5]:
Step 1 - convert all choices into rows and add artificial column to all values which are not missing.
def multi2 (-> multi
- (complement #{:id}))
- (tc/pivot->longer (:checked true))) (tc/add-column
def multi2 (-> multi
+ (complement #{:id}))
+ (tc/pivot->longer (:checked true))) (tc/add-column
multi2
multi2
_unnamed [8 4]:
Step 2 - Convert back to wide form with actual choices as columns
:note-to-test/skip
- ^-> multi2
- (
- (tc/drop-columns :$column):checked {:drop-missing? false})
- (tc/pivot->wider :$value :id)) (tc/order-by
:note-to-test/skip
+ ^-> multi2
+ (
+ (tc/drop-columns :$column):checked {:drop-missing? false})
+ (tc/pivot->wider :$value :id)) (tc/order-by
_unnamed [4 5]:
Conversion 1 - Group two column types
-> construction
- (#"^[125NWS].*|Midwest" {:target-columns [:units :region]
- (tc/pivot->longer :splitter (fn [col-name]
- if (re-matches #"^[125].*" col-name)
- (nil]
- [(construction-unit-map col-name) nil col-name]))
- [:value-column-name :n
- :drop-missing? false}))
-> construction
+ (#"^[125NWS].*|Midwest" {:target-columns [:units :region]
+ (tc/pivot->longer :splitter (fn [col-name]
+ if (re-matches #"^[125].*" col-name)
+ (nil]
+ [(construction-unit-map col-name) nil col-name]))
+ [:value-column-name :n
+ :drop-missing? false}))
data/construction.csv [63 5]:
Conversion 2 - Convert to longer form and back and rename columns
-> construction
- (#"^[125NWS].*|Midwest" {:target-columns [:units :region]
- (tc/pivot->longer :splitter (fn [col-name]
- if (re-matches #"^[125].*" col-name)
- (nil]
- [(construction-unit-map col-name) nil col-name]))
- [:value-column-name :n
- :drop-missing? false})
- :units :region] :n {:drop-missing? false})
- (tc/pivot->wider [zipmap (vals construction-unit-map)
- (tc/rename-columns (keys construction-unit-map)))) (
-> construction
+ (#"^[125NWS].*|Midwest" {:target-columns [:units :region]
+ (tc/pivot->longer :splitter (fn [col-name]
+ if (re-matches #"^[125].*" col-name)
+ (nil]
+ [(construction-unit-map col-name) nil col-name]))
+ [:value-column-name :n
+ :drop-missing? false})
+ :units :region] :n {:drop-missing? false})
+ (tc/pivot->wider [zipmap (vals construction-unit-map)
+ (tc/rename-columns (keys construction-unit-map)))) (
data/construction.csv [9 9]:
Convert to longer form
def stocks-long (tc/pivot->longer stocks-tidyr ["X" "Y" "Z"] {:value-column-name :price
- (:target-columns :stocks}))
def stocks-long (tc/pivot->longer stocks-tidyr ["X" "Y" "Z"] {:value-column-name :price
+ (:target-columns :stocks}))
stocks-long
stocks-long
data/stockstidyr.csv [30 3]:
Convert back to wide form
:stocks :price) (tc/pivot->wider stocks-long
:stocks :price) (tc/pivot->wider stocks-long
data/stockstidyr.csv [10 4]:
Convert to wide form on time column (let’s limit values to a couple of rows)
:note-to-test/skip
- ^-> stocks-long
- (range 0 30 4))
- (tc/select-rows ("time" :price {:drop-missing? false})) (tc/pivot->wider
:note-to-test/skip
+ ^-> stocks-long
+ (range 0 30 4))
+ (tc/select-rows ("time" :price {:drop-missing? false})) (tc/pivot->wider
data/stockstidyr.csv [3 6]:
ds2
ds2
_unnamed [9 5]:
:b) (tc/left-join ds2 ds1
:b) (tc/left-join ds2 ds1
left-outer-join [9 8]:
:a :b]) (tc/left-join ds1 ds2 [
:a :b]) (tc/left-join ds1 ds2 [
left-outer-join [9 8]:
:a :b]) (tc/left-join ds2 ds1 [
:a :b]) (tc/left-join ds2 ds1 [
left-outer-join [9 8]:
:left :a :right :e}) (tc/left-join ds1 ds2 {
:left :a :right :e}) (tc/left-join ds1 ds2 {
left-outer-join [11 8]:
:left :e :right :a}) (tc/left-join ds2 ds1 {
:left :e :right :a}) (tc/left-join ds2 ds1 {
left-outer-join [13 8]:
:b) (tc/right-join ds2 ds1
:b) (tc/right-join ds2 ds1
right-outer-join [9 8]:
:a :b]) (tc/right-join ds1 ds2 [
:a :b]) (tc/right-join ds1 ds2 [
right-outer-join [9 8]:
:a :b]) (tc/right-join ds2 ds1 [
:a :b]) (tc/right-join ds2 ds1 [
right-outer-join [9 8]:
:left :a :right :e}) (tc/right-join ds1 ds2 {
:left :a :right :e}) (tc/right-join ds1 ds2 {
right-outer-join [13 8]:
:left :e :right :a}) (tc/right-join ds2 ds1 {
:left :e :right :a}) (tc/right-join ds2 ds1 {
right-outer-join [11 8]:
:b) (tc/inner-join ds2 ds1
:b) (tc/inner-join ds2 ds1
inner-join [8 7]:
:a :b]) (tc/inner-join ds1 ds2 [
:a :b]) (tc/inner-join ds1 ds2 [
inner-join [4 8]:
:a :b]) (tc/inner-join ds2 ds1 [
:a :b]) (tc/inner-join ds2 ds1 [
inner-join [4 8]:
:left :a :right :e}) (tc/inner-join ds1 ds2 {
:left :a :right :e}) (tc/inner-join ds1 ds2 {
inner-join [9 7]:
:left :e :right :a}) (tc/inner-join ds2 ds1 {
:left :e :right :a}) (tc/inner-join ds2 ds1 {
inner-join [9 7]:
:b) (tc/full-join ds2 ds1
:b) (tc/full-join ds2 ds1
outer-join [10 7]:
:a :b]) (tc/full-join ds1 ds2 [
:a :b]) (tc/full-join ds1 ds2 [
outer-join [14 8]:
:a :b]) (tc/full-join ds2 ds1 [
:a :b]) (tc/full-join ds2 ds1 [
outer-join [14 8]:
:left :a :right :e}) (tc/full-join ds1 ds2 {
:left :a :right :e}) (tc/full-join ds1 ds2 {
outer-join [15 8]:
:left :e :right :a}) (tc/full-join ds2 ds1 {
:left :e :right :a}) (tc/full-join ds2 ds1 {
outer-join [15 8]:
:b) (tc/semi-join ds2 ds1
:b) (tc/semi-join ds2 ds1
_unnamed [8 5]:
:a :b]) (tc/semi-join ds1 ds2 [
:a :b]) (tc/semi-join ds1 ds2 [
_unnamed [4 3]:
:a :b]) (tc/semi-join ds2 ds1 [
:a :b]) (tc/semi-join ds2 ds1 [
_unnamed [4 5]:
:left :a :right :e}) (tc/semi-join ds1 ds2 {
:left :a :right :e}) (tc/semi-join ds1 ds2 {
_unnamed [7 3]:
:left :e :right :a}) (tc/semi-join ds2 ds1 {
:left :e :right :a}) (tc/semi-join ds2 ds1 {
_unnamed [5 5]:
:b) (tc/anti-join ds2 ds1
:b) (tc/anti-join ds2 ds1
_unnamed [1 5]:
:a :b]) (tc/anti-join ds1 ds2 [
:a :b]) (tc/anti-join ds1 ds2 [
_unnamed [5 3]:
:left :a :right :e}) (tc/anti-join ds1 ds2 {
:left :a :right :e}) (tc/anti-join ds1 ds2 {
_unnamed [2 3]:
:left :e :right :a}) (tc/anti-join ds2 ds1 {
:left :e :right :a}) (tc/anti-join ds2 ds1 {
_unnamed [4 5]:
:left [:a :b] :right :e}) (tc/cross-join ds1 ds2 {
:left [:a :b] :right :e}) (tc/cross-join ds1 ds2 {
cross-join [81 3]:
:a :c] [:e :b]) (tc/complete ds2 [
:a :c] [:e :b]) (tc/complete ds2 [
left-outer-join [81 5]:
right-ds
right-ds
_unnamed [5 2]:
:a) (tc/asof-join left-ds right-ds
:a) (tc/asof-join left-ds right-ds
asof-<= [3 4]:
:a {:asof-op :nearest}) (tc/asof-join left-ds right-ds
:a {:asof-op :nearest}) (tc/asof-join left-ds right-ds
asof-nearest [3 4]:
:a {:asof-op :>=}) (tc/asof-join left-ds right-ds
:a {:asof-op :>=}) (tc/asof-join left-ds right-ds
asof->= [3 4]:
:d)) (tc/concat ds1 (tc/drop-columns ds2
:d)) (tc/concat ds1 (tc/drop-columns ds2
_unnamed [18 4]:
:note-to-test/skip
- ^apply tc/concat (repeatedly 3 #(tc/random DS))) (
:note-to-test/skip
+ ^apply tc/concat (repeatedly 3 #(tc/random DS))) (
_unnamed [27 4]:
2 | -6 | +1 | +3 | 1.5 | C | ||
1 | -1 | +2 | +4 | 0.5 | A | ||
1 | -3 | -1.5 | -C | +5 | +1.0 | +B | |
2 | -6 | -1.5 | -C | +4 | +0.5 | +A | |
1 | -1 | +7 | 0.5 | A | |||
1 | -1 | -0.5 | -A | +9 | +1.5 | +C | |
1 | -7 | -0.5 | -A | +2 | +8 | +1.0 | +B |
1 | @@ -25867,15 +25864,15 @@|||||||
2 | -2 | -1.0 | -B | +4 | +0.5 | +A | |
2 | -6 | -1.5 | -C | +8 | +1.0 | +B | |
… | @@ -25885,37 +25882,37 @@|||||||
2 | -8 | +2 | 1.0 | B | |||
2 | -2 | +1 | +5 | 1.0 | B | ||
1 | -3 | -1.5 | -C | -||||
1 | 5 | 1.0 | B | ||||
2 | +|||||||
2 | +8 | 1.0 | B | ||||
1 | +3 | +1.5 | +C | +||||
2 | -4 | +1 | +1 | 0.5 | A | ||
1 | -7 | +1 | 0.5 | A | |||
2 | -4 | -0.5 | -A | -||||
2 | -8 | 1.0 | B | ||||
1 | +9 | +1.5 | +C | +||||
2 | -8 | -1.0 | -B | +1 | +3 | +1.5 | +C |
Concatenation of grouped datasets results also in grouped dataset.
:V3])
- (tc/concat (tc/group-by DS [:V4])) (tc/group-by DS [
:V3])
+ (tc/concat (tc/group-by DS [:V4])) (tc/group-by DS [
_unnamed [6 3]:
:note-to-test/skip
- ^apply tc/union (repeatedly 10 #(tc/random DS))) (
:note-to-test/skip
+ ^apply tc/union (repeatedly 10 #(tc/random DS))) (
union [9 4]:
2 | -2 | +8 | +1.0 | +B | +|||
1 | +9 | +1.5 | +C | +||||
1 | +5 | 1.0 | B | ||||
2 | -8 | -1.0 | -B | -||||
2 | 4 | 0.5 | A | ||||
1 | -5 | -1.0 | -B | +3 | +1.5 | +C | |
1 | 1 | 0.5 | A | ||||
1 | -3 | -1.5 | -C | -||||
1 | -9 | -1.5 | -C | +2 | +2 | +1.0 | +B |
bind
adds empty columns during concat
(tc/bind ds1 ds2)
(tc/bind ds1 ds2)
_unnamed [18 5]:
(tc/bind ds2 ds1)
(tc/bind ds2 ds1)
_unnamed [18 5]:
:b)
- (tc/difference (tc/select-columns ds2 :b)) (tc/select-columns ds1
:b)
+ (tc/difference (tc/select-columns ds2 :b)) (tc/select-columns ds1
difference [1 1]:
0 | :a | -:g1 | +:g3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | :a | -:g1 | +:g2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | @@ -26754,12 +26751,12 @@|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3 | :a | -:g1 | +:g2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 | :a | -:g1 | +:g2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5 | @@ -26774,7 +26771,7 @@|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
7 | :a | -:g3 | +:g2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
8 | @@ -26799,12 +26796,12 @@|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
15 | :a | -:g3 | +:g1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
16 | :a | -:g3 | +:g2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
17 | @@ -26814,12 +26811,12 @@|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
18 | :a | -:g3 | +:g2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
19 | :a | -:g3 | +:g1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
20 | @@ -26829,12 +26826,12 @@|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
21 | :b | -:g3 | +:g2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
22 | :b | -:g2 | +:g3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
23 | @@ -26852,10 +26849,10 @@
16 | +19 | :a | -:g3 | +:g1 | :train | 0 | |
21 | -:b | -:g3 | +16 | +:a | +:g2 | :train | 0 |
7 | +13 | :a | -:g3 | +:g1 | :train | 0 | |
8 | +5 | :a | :g3 | :train | 0 | ||
3 | +9 | :a | -:g1 | +:g3 | :train | 0 | |
23 | -:b | +18 | +:a | :g2 | :train | 0 | |
11 | +8 | :a | -:g2 | +:g3 | :train | 0 | |
5 | -:a | -:g3 | +23 | +:b | +:g2 | :train | 0 |
17 | +15 | :a | -:g2 | +:g1 | :train | 0 | |
14 | -:a | -:g2 | +20 | +:b | +:g1 | :train | 0 |
9 | +7 | :a | -:g3 | +:g2 | :train | 0 | |
1 | +4 | :a | -:g1 | +:g2 | :train | 0 | |
24 | +22 | :b | -:g1 | +:g3 | :train | 0 | |
20 | +24 | :b | :g1 | :train | 0 | ||
18 | +14 | :a | -:g3 | +:g2 | :train | 0 | 0 |
4 | +12 | :a | :g1 | :train | 0 | ||
19 | +1 | :a | -:g3 | +:g2 | :train | 0 | |
6 | +11 | :a | :g3 | :train | 0 | ||
22 | -:b | +3 | +:a | :g2 | :train | 0 | |
12 | +6 | :a | -:g2 | +:g3 | :test | 0 | |
10 | +0 | :a | -:g2 | +:g3 | :test | 0 | |
15 | +17 | :a | -:g3 | +:g2 | :test | 0 | |
0 | -:a | -:g1 | +21 | +:b | +:g2 | :test | 0 |
13 | +10 | :a | :g1 | :test | 0 | ||
12 | +6 | :a | -:g2 | +:g3 | :train | 1 | |
10 | +0 | :a | -:g2 | +:g3 | :train | 1 | |
15 | +17 | :a | -:g3 | +:g2 | :train | 1 | |
0 | -:a | -:g1 | +21 | +:b | +:g2 | :train | 1 |
13 | +10 | :a | :g1 | :train | @@ -27083,10 +27080,10 @@
Partition according to :k
column to reflect it’s distribution
:note-to-test/skip
- ^-> for-splitting
- (:kfold {:partition-selector :partition})
- (tc/split 30)) (tc/head
:note-to-test/skip
+ ^-> for-splitting
+ (:kfold {:partition-selector :partition})
+ (tc/split 30)) (tc/head
_unnamed, (splitted) [30 5]:
14 | +4 | :a | :g2 | :train | 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
9 | +19 | :a | -:g3 | +:g1 | :train | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0 | +1 | :a | -:g1 | +:g2 | :train | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3 | +7 | :a | -:g1 | +:g2 | :train | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6 | +18 | :a | -:g3 | +:g2 | :train | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
13 | +0 | :a | -:g1 | +:g3 | :train | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
15 | +3 | :a | -:g3 | +:g2 | :train | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
11 | +14 | :a | :g2 | :train | 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
17 | +13 | :a | -:g2 | +:g1 | :train | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | +5 | :a | -:g1 | +:g3 | :train | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
16 | +6 | :a | :g3 | :train | 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
7 | +12 | :a | -:g3 | +:g1 | :train | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | +11 | :a | -:g1 | +:g3 | :train | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
12 | +15 | :a | -:g2 | +:g1 | :train | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10 | +8 | :a | -:g2 | +:g3 | :train | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5 | +17 | :a | -:g3 | +:g2 | :train | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
8 | +9 | :a | :g3 | :test | 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 | +16 | :a | -:g1 | +:g2 | :test | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
18 | +10 | :a | -:g3 | +:g1 | :test | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
19 | +2 | :a | -:g3 | +:g1 | :test | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
8 | +9 | :a | :g3 | :train | 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 | +16 | :a | -:g1 | +:g2 | :train | 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
18 | +10 | :a | -:g3 | +:g1 | :train | 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
19 | +2 | :a | -:g3 | +:g1 | :train | 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6 | +18 | :a | -:g3 | +:g2 | :train | 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
13 | +0 | :a | -:g1 | +:g3 | :train | 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
15 | +3 | :a | -:g3 | +:g2 | :train | 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
11 | +14 | :a | :g2 | :train | 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
17 | +13 | :a | -:g2 | +:g1 | :train | 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | +5 | :a | -:g1 | +:g3 | :train | 1 |
0 | +10 | :a | :g1 | :train | 0 | ||
19 | +7 | :a | -:g3 | +:g2 | :train | 0 | |
13 | +14 | :a | -:g1 | +:g2 | :train | 0 | |
15 | +11 | :a | :g3 | :train | 0 | ||
2 | +10 | :a | :g1 | :train | 0 | ||
15 | +17 | :a | -:g3 | +:g2 | :train | 0 | |
10 | +1 | :a | :g2 | :train | 0 | ||
17 | +15 | :a | -:g2 | +:g1 | :train | 0 | |
19 | +11 | :a | :g3 | :train | 0 | ||
6 | +2 | :a | -:g3 | +:g1 | :train | 0 | … |
23 | -:b | -:g2 | +10 | +:a | +:g1 | :train | 0 |
22 | :b | -:g2 | +:g3 | :train | 0 | ||
14 | +8 | :a | -:g2 | +:g3 | :train | 0 | |
11 | +3 | :a | :g2 | -:train | +:test | 0 | |
3 | +4 | :a | -:g1 | +:g2 | :test | 0 | |
5 | +6 | :a | :g3 | :test | 0 | ||
8 | +9 | :a | :g3 | :test | 0 | ||
9 | +13 | :a | -:g3 | +:g1 | :test | 0 | |
12 | +16 | :a | :g2 | :test | 0 | ||
18 | -:a | -:g3 | +20 | +:b | +:g1 | :test | 0 |
20 | +23 | :b | -:g1 | +:g2 | :test | 0 |
with repeats, to get 100 splits
:note-to-test/skip
- ^-> for-splitting
- (:bootstrap {:repeats 100})
- (tc/split
- (:$split-id)distinct)
- (count)) (
:note-to-test/skip
+ ^-> for-splitting
+ (:bootstrap {:repeats 100})
+ (tc/split
+ (:$split-id)distinct)
+ (count)) (
100
100
with small ratio
:note-to-test/skip
- ^:holdout {:ratio 0.2}) (tc/split for-splitting
:note-to-test/skip
+ ^:holdout {:ratio 0.2}) (tc/split for-splitting
_unnamed, (splitted) [25 5]:
4 | -:a | +20 | +:b | :g1 | :train | 0 | |
1 | +13 | :a | :g1 | :train | 0 | ||
3 | -:a | -:g1 | +22 | +:b | +:g3 | :train | 0 |
6 | +12 | :a | -:g3 | +:g1 | :train | 0 | |
19 | +8 | :a | :g3 | :train | 0 | ||
14 | +6 | :a | -:g2 | +:g3 | :test | 0 | |
2 | +0 | :a | -:g1 | +:g3 | :test | 0 | |
0 | +18 | :a | -:g1 | +:g2 | :test | 0 | |
16 | +15 | :a | -:g3 | +:g1 | :test | 0 | |
10 | +19 | :a | -:g2 | +:g1 | :test | 0 | … |
9 | +5 | :a | :g3 | :test | 0 | ||
12 | +1 | :a | :g2 | :test | 0 | ||
21 | -:b | -:g3 | +14 | +:a | +:g2 | :test | 0 |
13 | +2 | :a | :g1 | :test | 0 | ||
23 | -:b | +7 | +:a | :g2 | :test | 0 | |
17 | +9 | :a | -:g2 | +:g3 | :test | 0 | |
18 | -:a | -:g3 | +23 | +:b | +:g2 | :test | 0 |
24 | -:b | -:g1 | +3 | +:a | +:g2 | :test | 0 |
15 | +4 | :a | -:g3 | +:g2 | :test | 0 | |
7 | +17 | :a | -:g3 | +:g2 | :test | 0 | |
5 | +16 | :a | -:g3 | +:g2 | :test | 0 |
you can split to more than two subdatasets with holdout
:note-to-test/skip
- ^:holdout {:ratio [0.1 0.2 0.3 0.15 0.25]}) (tc/split for-splitting
:note-to-test/skip
+ ^:holdout {:ratio [0.1 0.2 0.3 0.15 0.25]}) (tc/split for-splitting
_unnamed, (splitted) [25 5]:
0 | +14 | :a | -:g1 | +:g2 | :train | 0 | |
4 | +1 | :a | -:g1 | +:g2 | :train | 0 | |
11 | -:a | -:g2 | +24 | +:b | +:g1 | :test | 0 |
18 | +10 | :a | -:g3 | +:g1 | :test | 0 | |
21 | -:b | -:g3 | +17 | +:a | +:g2 | :test | 0 |
1 | +2 | :a | :g1 | :test | 0 | ||
17 | +7 | :a | :g2 | :test | 0 | ||
7 | -:a | +22 | +:b | :g3 | :split-2 | 0 | |
6 | +15 | :a | -:g3 | +:g1 | :split-2 | 0 | |
22 | -:b | +16 | +:a | :g2 | :split-2 | 0 | @@ -27770,79 +27767,79 @@… |
14 | +9 | :a | -:g2 | +:g3 | :split-3 | 0 | |
16 | -:a | -:g3 | +23 | +:b | +:g2 | :split-3 | 0 |
8 | +6 | :a | :g3 | :split-3 | 0 | ||
9 | +0 | :a | :g3 | :split-4 | 0 | ||
19 | +3 | :a | -:g3 | +:g2 | :split-4 | 0 | |
3 | +8 | :a | -:g1 | +:g3 | :split-4 | 0 | |
12 | :a | -:g2 | +:g1 | :split-4 | 0 | ||
23 | +20 | :b | -:g2 | +:g1 | :split-4 | 0 | |
20 | -:b | +13 | +:a | :g1 | :split-4 | 0 | |
24 | -:b | -:g1 | +11 | +:a | +:g3 | :split-4 | 0 |
13 | +18 | :a | -:g1 | +:g2 | :split-4 | 0 |
you can use also proportions with custom names
:note-to-test/skip
- ^:holdout {:ratio [5 3 11 2]
- (tc/split for-splitting :split-names ["small" "smaller" "big" "the rest"]})
:note-to-test/skip
+ ^:holdout {:ratio [5 3 11 2]
+ (tc/split for-splitting :split-names ["small" "smaller" "big" "the rest"]})
_unnamed, (splitted) [25 5]:
14 | +8 | :a | -:g2 | +:g3 | small | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
23 | +24 | :b | -:g2 | +:g1 | small | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
11 | -:a | -:g2 | +20 | +:b | +:g1 | small | 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3 | +18 | :a | -:g1 | +:g2 | small | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
7 | -:a | -:g3 | +21 | +:b | +:g2 | small | 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
22 | -:b | -:g2 | +2 | +:a | +:g1 | smaller | 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10 | +9 | :a | -:g2 | +:g3 | smaller | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 | +16 | :a | -:g1 | +:g2 | smaller | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
13 | +7 | :a | -:g1 | +:g2 | big | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
21 | -:b | +6 | +:a | :g3 | big | 0 | @@ -27944,77 +27941,77 @@… | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
9 | +17 | :a | -:g3 | +:g2 | big | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
16 | +0 | :a | :g3 | big | 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6 | +1 | :a | -:g3 | +:g2 | big | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5 | +13 | :a | -:g3 | +:g1 | big | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | +19 | :a | :g1 | big | 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
20 | -:b | -:g1 | +4 | +:a | +:g2 | big | 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0 | +15 | :a | :g1 | big | 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
12 | +5 | :a | -:g2 | +:g3 | the rest | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
15 | +12 | :a | -:g3 | +:g1 | the rest | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
19 | -:a | +22 | +:b | :g3 | the rest | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
8 | +11 | :a | :g3 | the rest | @@ -28027,10 +28024,10 @@
16 | +15 | :a | -:g3 | +:g1 | :train | 0 | |
4 | +13 | :a | :g1 | :train | 0 | ||
24 | -:b | -:g1 | +11 | +:a | +:g3 | :train | 0 |
12 | +18 | :a | :g2 | :train | 0 | ||
6 | +4 | :a | -:g3 | +:g2 | :train | 0 | |
21 | -:b | -:g3 | +2 | +:a | +:g1 | :train | 0 |
18 | +3 | +:a | +:g2 | +:train | +0 | +||
6 | :a | :g3 | :train | 0 | |||
21 | +:b | +:g2 | +:train | +0 | +|||
20 | +23 | :b | -:g1 | +:g2 | :train | 0 | |
1 | +19 | :a | :g1 | :train | 0 | ||
13 | -:a | +20 | +:b | :g1 | :train | 0 | @@ -28260,12 +28271,12 @@|
0 | :a | -:g1 | +:g3 | :train | 0 | ||
3 | +12 | :a | :g1 | :train | @@ -28279,136 +28290,122 @@0 | ||
5 | -:a | -:g3 | +24 | +:b | +:g1 | :train | 0 |
19 | +10 | :a | -:g3 | +:g1 | :train | 0 | |
17 | +7 | :a | :g2 | :train | 0 | ||
2 | +9 | :a | -:g1 | +:g3 | :train | 0 | |
10 | +1 | :a | :g2 | :train | 0 | ||
11 | -:a | -:g2 | +22 | +:b | +:g3 | :train | 0 |
9 | +17 | :a | -:g3 | +:g2 | :train | 0 | |
7 | +16 | :a | -:g3 | -:train | -0 | -||
23 | -:b | :g2 | :train | 0 | |||
15 | +|||||||
5 | :a | :g3 | -:train | -0 | -|||
22 | -:b | -:g2 | :test | 0 | |||
22 | -:b | -:g2 | +5 | +:a | +:g3 | :train | 1 |
4 | +13 | :a | :g1 | :train | 1 | ||
24 | -:b | -:g1 | +11 | +:a | +:g3 | :train | 1 |
12 | +18 | :a | :g2 | :train | 1 | ||
6 | +4 | :a | -:g3 | +:g2 | :train | 1 |
:note-to-test/skip
- ^-> for-splitting
- (:loo)
- (tc/split (tc/row-count))
:note-to-test/skip
+ ^-> for-splitting
+ (:loo)
+ (tc/split (tc/row-count))
625
625
:note-to-test/skip
- ^-> for-splitting
- (:group)
- (tc/group-by :bootstrap {:partition-selector :partition :seed 11 :ratio 0.8})) (tc/split
:note-to-test/skip
+ ^-> for-splitting
+ (:group)
+ (tc/group-by :bootstrap {:partition-selector :partition :seed 11 :ratio 0.8})) (tc/split
_unnamed [3 3]:
:g1 | +:g3 | 0 | -Group: :g1, (splitted) [10 5]: | +Group: :g3, (splitted) [9 5]: |
:g3 | +:g2 | 1 | -Group: :g3, (splitted) [13 5]: | +Group: :g2, (splitted) [13 5]: |
:g2 | +:g1 | 2 | -Group: :g2, (splitted) [9 5]: | +Group: :g1, (splitted) [8 5]: |
To get a sequence of pairs, use split->seq
function
:note-to-test/skip
- ^-> for-splitting
- (:kfold {:partition-selector :partition})
- (tc/split->seq first)) (
:note-to-test/skip
+ ^-> for-splitting
+ (:kfold {:partition-selector :partition})
+ (tc/split->seq first)) (
@@ -28485,7 +28482,7 @@