$join does not work if the 1st element in the second dataset does not have a corresponding element in the first dataset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns experiment.incanter | |
(:require [incanter.core :as i])) | |
(def join-dataset-1 (i/dataset [:id :vehicle-type] | |
[[1 "car"] | |
[2 "motor-bike"] | |
[3 "train"]])) | |
;;;(i/view join-dataset-1) | |
(def join-dataset-2 (i/dataset [:id :number-wheels] | |
[[1 4] | |
[2 2] | |
[3 "many"]])) | |
;;;(i/view join-dataset-2) | |
;;; (->> (i/$join [:id :id] join-dataset-2 join-dataset-1) i/view) | |
(def join-dataset-3 (i/dataset [:id :number-wheels] | |
[;;[1 4] | |
[2 2] | |
[3 "many"]])) | |
;;;(i/view join-dataset-3) | |
;;(->> (i/$join [:id :id] join-dataset-3 join-dataset-1) i/view) | |
(def join-dataset-4 (i/dataset [:id :number-wheels] | |
[[1 4] | |
;;[2 2] | |
[3 "many"]])) | |
;;;(i/view join-dataset-4) | |
;;(->> (i/$join [:id :id] join-dataset-4 join-dataset-1) i/view) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment