Liking cljdoc? Tell your friends :D

tech.ml.dataset.base


->datasetclj

(->dataset dataset)
(->dataset dataset {:keys [table-name] :or {table-name "_unnamed"} :as options})
source

add-columnclj

(add-column dataset column)

Add a new column. Error if name collision

Add a new column. Error if name collision
sourceraw docstring

add-or-update-columnclj

(add-or-update-column dataset column)

If column exists, replace. Else append new column.

If column exists, replace.  Else append new column.
sourceraw docstring

columnclj

(column dataset column-name)

Return the column or throw if it doesn't exist.

Return the column or throw if it doesn't exist.
sourceraw docstring

column-mapclj

(column-map datatypes)

clojure map of column-name->column

clojure map of column-name->column
sourceraw docstring

column-namesclj

(column-names dataset)

In-order sequence of column names

In-order sequence of column names
sourceraw docstring

columnsclj

(columns dataset)

Return sequence of all columns in dataset.

Return sequence of all columns in dataset.
sourceraw docstring

columns-with-missing-seqclj

(columns-with-missing-seq dataset)

Return a sequence of: {:column-name column-name :missing-count missing-count } or nil of no columns are missing data.

Return a sequence of:
{:column-name column-name
 :missing-count missing-count
}
or nil of no columns are missing data.
sourceraw docstring

dataset-nameclj

(dataset-name dataset)
source

ds-column-mapclj

(ds-column-map map-fn first-ds & ds-seq)

Map a function columnwise across datasets and produce a new dataset. column sequence. Note this does not produce a new dataset as that would preclude remove,filter on nil values.

Map a function columnwise across datasets and produce a new dataset.
column sequence.  Note this does not produce a new dataset as that would
preclude remove,filter on nil values.
sourceraw docstring

ds-concatclj

(ds-concat dataset & other-datasets)
source

ds-filterclj

(ds-filter predicate dataset & [column-name-seq])

dataset->dataset transformation

dataset->dataset transformation
sourceraw docstring

ds-group-byclj

(ds-group-by key-fn dataset & [column-name-seq])

Produce a map of key-fn-value->dataset. key-fn is a function taking Y values where Y is the count of column-name-seq or :all.

Produce a map of key-fn-value->dataset.  key-fn is a function taking
Y values where Y is the count of column-name-seq or :all.
sourceraw docstring

ds-map-valuesclj

(ds-map-values dataset map-fn & [column-name-seq])

Note this returns a sequence, not a dataset.

Note this returns a sequence, not a dataset.
sourceraw docstring

ds-sort-byclj

(ds-sort-by key-fn dataset)
(ds-sort-by key-fn compare-fn dataset)
(ds-sort-by key-fn compare-fn dataset column-name-seq)
source

ds-take-nthclj

(ds-take-nth n-val dataset)
source

from-prototypeclj

(from-prototype dataset table-name column-seq)

Create a new dataset that is the same type as this one but with a potentially different table name and column sequence. Take care that the columns are all of the correct type.

Create a new dataset that is the same type as this one but with a potentially
different table name and column sequence.  Take care that the columns are all of
the correct type.
sourceraw docstring

index-value-seqclj

(index-value-seq dataset)

Get a sequence of tuples: [idx col-value-vec]

Values are in order of column-name-seq. Duplicate names are allowed and result in duplicate values.

Get a sequence of tuples:
  [idx col-value-vec]

Values are in order of column-name-seq.  Duplicate names are allowed and result in
duplicate values.
sourceraw docstring

map-seq->datasetclj

(map-seq->dataset map-seq
                  {:keys [scan-depth column-definitions table-name
                          dataset-constructor]
                   :or {scan-depth 100
                        table-name "_unnamed"
                        dataset-constructor
                          (quote tech.libs.tablesaw/map-seq->tablesaw-dataset)}
                   :as options})

Given a sequence of maps, construct a dataset. Defaults to a tablesaw-based dataset.

Given a sequence of maps, construct a dataset.  Defaults to a tablesaw-based
dataset.
sourceraw docstring

maybe-columnclj

(maybe-column dataset column-name)

Return either column if exists or nil.

Return either column if exists or nil.
sourceraw docstring

metadataclj

(metadata dataset)
source

new-columnclj

(new-column dataset column-name values)
(new-column dataset
            column-name
            values
            {:keys [datatype container-type]
             :or {container-type :tablesaw-column}
             :as options})

Create a new column from some values.

Create a new column from some values.
sourceraw docstring

order-column-namesclj

(order-column-names dataset colname-seq)

Order a sequence of columns names so they match the order in the original dataset. Missing columns are placed last.

Order a sequence of columns names so they match the order in the
original dataset.  Missing columns are placed last.
sourceraw docstring

remove-columnclj

(remove-column dataset col-name)

Fails quietly

Fails quietly
sourceraw docstring

remove-columnsclj

(remove-columns dataset colname-seq)
source

selectclj

(select dataset colname-seq index-seq)

Reorder/trim dataset according to this sequence of indexes. Returns a new dataset. colname-seq - either keyword :all or list of column names with no duplicates. index-seq - either keyword :all or list of indexes. May contain duplicates.

Reorder/trim dataset according to this sequence of indexes.  Returns a new dataset.
colname-seq - either keyword :all or list of column names with no duplicates.
index-seq - either keyword :all or list of indexes.  May contain duplicates.
sourceraw docstring

select-columnsclj

(select-columns dataset col-name-seq)
source

set-metadataclj

(set-metadata dataset meta-map)
source

supported-column-statsclj

(supported-column-stats dataset)

Return the set of natively supported stats for the dataset. This must be at least #{:mean :variance :median :skew}.

Return the set of natively supported stats for the dataset.  This must be at least
#{:mean :variance :median :skew}.
sourceraw docstring

unordered-selectclj

(unordered-select dataset colname-seq index-seq)

Perform a selection but use the order of the columns in the existing table; do not reorder the columns based on colname-seq. Useful when doing selection based on sets.

Perform a selection but use the order of the columns in the existing table; do
*not* reorder the columns based on colname-seq.  Useful when doing selection based
on sets.
sourceraw docstring

update-columnclj

(update-column dataset col-name update-fn)

Update a column returning a new dataset. update-fn is a column->column transformation. Error if column does not exist.

Update a column returning a new dataset.  update-fn is a column->column
transformation.  Error if column does not exist.
sourceraw docstring

update-columnsclj

(update-columns dataset column-name-seq update-fn)

Update a sequence of columns.

Update a sequence of columns.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close