9 lines
224 B
Elixir
9 lines
224 B
Elixir
defmodule Casebot.CSV do
|
|
def rows(path) do
|
|
path
|
|
|> File.read!()
|
|
|> NimbleCSV.RFC4180.parse_string(skip_headers: false)
|
|
|> Enum.map(fn row -> Enum.map(row, &:binary.copy/1) |> List.to_tuple() end)
|
|
end
|
|
end
|