A namespace for functions related to reading and writing datasets to various file formats.
This namespace provides functions for loading datasets from files, writing datasets to files, and converting between different file formats. It also provides a configuration map of supported file formats and their associated reader and writer functions.
Examples:
(read-dataset-seq state :filename)
(write-dataset-seq state :filename [dataset1 dataset2 ...])
A namespace for functions related to reading and writing datasets to various file formats. This namespace provides functions for loading datasets from files, writing datasets to files, and converting between different file formats. It also provides a configuration map of supported file formats and their associated reader and writer functions. Examples: (read-dataset-seq state :filename) (write-dataset-seq state :filename [dataset1 dataset2 ...])
(convert-file filename format)
Converts a file into another file type and returns the new filename.
Converts a file into another file type and returns the new filename.
(dataset-seq->column-names ds-seq)
Returns a sequence of column names for a given dataset sequence.
The ds-seq
argument should be a sequence of datasets for which to
return the column names. The returned sequence will contain the column
names for the first dataset in the sequence.
Returns a sequence of column names for the given dataset sequence.
Returns a sequence of column names for a given dataset sequence. The `ds-seq` argument should be a sequence of datasets for which to return the column names. The returned sequence will contain the column names for the first dataset in the sequence. Returns a sequence of column names for the given dataset sequence.
(extension filename)
Returns a filenames last file extension.
Returns a filenames last file extension.
(file? filename)
Returns true if a file exists and false otherwise.
Returns true if a file exists and false otherwise.
(filename->format filename)
Parses a format lookup key from a filename.
The filename
argument should be a string containing the filename to parse. It
must contain a file extension that is in formats.
Returns the format lookup key for the given filename.
Parses a format lookup key from a filename. The `filename` argument should be a string containing the filename to parse. It must contain a file extension that is in formats. Returns the format lookup key for the given filename.
Supported file formats for reading and writing datasets.
Supported file formats for reading and writing datasets.
(read-dataset-seq)
(read-dataset-seq filename)
(read-dataset-seq s key)
Loads the dataset at the file path in key.
If the filename
argument is provided, it should be a string containing the
file path of the dataset to load. If the s
and key
arguments are provided,
the s
argument should be a map containing the key
value that identifies
the file path of the dataset to load.
Returns a sequence of datasets from the specified file.
Examples:
(read-dataset-seq '/path/to/file.csv') (read-dataset-seq {:filename '/path/to/file.csv'} :filename)
Loads the dataset at the file path in key. If the `filename` argument is provided, it should be a string containing the file path of the dataset to load. If the `s` and `key` arguments are provided, the `s` argument should be a map containing the `key` value that identifies the file path of the dataset to load. Returns a sequence of datasets from the specified file. Examples: (read-dataset-seq '/path/to/file.csv') (read-dataset-seq {:filename '/path/to/file.csv'} :filename)
(write-dataset filename dataset)
(write-dataset s key dataset)
Writes a dataset to a file using the specified format.
The dataset
argument should be a sequence of datasets to write to the file.
The file format will be determined by the file extension of the filename.
Returns nil.
Writes a dataset to a file using the specified format. The `dataset` argument should be a sequence of datasets to write to the file. The file format will be determined by the file extension of the filename. Returns nil.
(write-dataset-seq k-means-state key ds-seq)
Writes a sequence of datasets to a file using the specified format.
The k-means-state
argument should be a map containing the key
value that
identifies the file to write to. The ds-seq
argument should be a sequence of
datasets to write to the file. The file format will be determined by the file
extension of the filename specified in the k-means-state
map.
Returns nil.
Writes a sequence of datasets to a file using the specified format. The `k-means-state` argument should be a map containing the `key` value that identifies the file to write to. The `ds-seq` argument should be a sequence of datasets to write to the file. The file format will be determined by the file extension of the filename specified in the `k-means-state` map. Returns nil.
(write-datasets filename ds-seq)
Writes a sequence of datasets to filename.
The ds-seq
argument should be a sequence of datasets to write to the file.
The file format will be determined by the file extension of the filename.
Returns nil.
Writes a sequence of datasets to filename. The `ds-seq` argument should be a sequence of datasets to write to the file. The file format will be determined by the file extension of the filename. Returns nil.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close