Skip to content

Possible example for tech.v3.dataset.join/right-join docstring #441

@harold

Description

@harold
user> (require '[tech.v3.dataset :as ds])
nil
user> (require '[tech.v3.dataset.join :as ds-join])
nil
user> (-> (ds-join/right-join :x
                              (ds/->dataset {:x [0 1 2 4 5]
                                             :y (repeatedly 5 rand)})
                              (ds/->dataset {:x (range 7)}))
          (ds/sort-by-column :right.x))
right-outer-join [7 3]:

| :x |         :y | :right.x |
|---:|-----------:|---------:|
|  0 | 0.17487750 |        0 |
|  1 | 0.54553611 |        1 |
|  2 | 0.89709861 |        2 |
|    |            |        3 |
|  4 | 0.99650722 |        4 |
|  5 | 0.11238939 |        5 |
|    |            |        6 |

Wrote this tonight to test my understanding, maybe it, or something similar could be included in the docstring?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions