Skip to content

Instantly share code, notes, and snippets.

@itang
Last active August 29, 2015 14:25
Show Gist options
  • Save itang/08cd5cea26955fb09da6 to your computer and use it in GitHub Desktop.
Save itang/08cd5cea26955fb09da6 to your computer and use it in GitHub Desktop.
test csv in Elixir
ret =
File.stream!("GeoID.csv")
|> CSV.decode(separator: ?,)
|> Enum.map(fn row -> row |> Enum.map &String.upcase/1 end)
ret
|> tl
|> Enum.each fn row ->
{t1, t2, t3, t4, t5, t6, _} = List.to_tuple row
IO.puts t5
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment