utility for loading data from a csv
This commit is contained in:
parent
cabf5bc376
commit
acdc1ed18a
12
src/propeller/tools/loading.cljc
Normal file
12
src/propeller/tools/loading.cljc
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
(ns propeller.tools.loading
|
||||||
|
"Functions to help facilitate loading data"
|
||||||
|
(:require
|
||||||
|
[clojure.core :refer [with-open]]
|
||||||
|
[clojure.java.io :as io]
|
||||||
|
[clojure.data.csv :as csv]))
|
||||||
|
|
||||||
|
(defn load-data-csv
|
||||||
|
[path]
|
||||||
|
(with-open [reader (io/reader path)]
|
||||||
|
(->> (csv/read-csv reader)
|
||||||
|
(doall))))
|
Loading…
x
Reference in New Issue
Block a user