Skip to content

Commit

Permalink
Added details to group-by, group-by-column docstrings. (#375)
Browse files Browse the repository at this point in the history
Added details to group-by, group-by-column docstrings.

Co-authored-by: mabrams <[email protected]>
  • Loading branch information
mars0i and mars0i committed Oct 8, 2023
1 parent 3aaa388 commit 05321f9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 7 additions & 3 deletions src/tech/v3/dataset.clj
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,10 @@ null [6 3]:


(defn group-by
"Produce a map of key-fn-value->dataset. key-fn is a function taking
a map of colname->column-value.
"Produce a map of key-fn-value->dataset. The argument to key-fn
is a map of colname->column-value representing a row in dataset.
Each dataset in the resulting map contains all and only rows
that produce the same key-fn-value.
Options - options are passed into dtype arggroup:
Expand All @@ -666,7 +668,9 @@ null [6 3]:


(defn group-by-column
"Return a map of column-value->dataset.
"Return a map of column-value->dataset. Each dataset in the
resulting map contains all and only rows with the same value in
column.
* `:group-by-finalizer` - when provided this is run on each dataset immediately after the
rows are selected. This can be used to immediately perform a reduction on each new
Expand Down
10 changes: 7 additions & 3 deletions src/tech/v3/dataset/base.clj
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,10 @@


(defn group-by
"Produce a map of key-fn-value->dataset. key-fn is a function taking
a map of colname->column-value.
"Produce a map of key-fn-value->dataset. The argument to key-fn
is a map of colname->column-value representing a row in dataset.
Each dataset in the resulting map contains all and only rows
that produce the same key-fn-value.
Options - options are passed into dtype arggroup:
Expand All @@ -550,7 +552,9 @@


(defn group-by-column
"Return a map of column-value->dataset.
"Return a map of column-value->dataset. Each dataset in the
resulting map contains all and only rows with the same value in
column.
* `:group-by-finalizer` - when provided this is run on each dataset immediately after the
rows are selected. This can be used to immediately perform a reduction on each new
Expand Down

0 comments on commit 05321f9

Please sign in to comment.