Closed gouthamvel closed 8 years ago
The input to CSV is required to be enumerable - that means if you have a string you could e.g. split it by line with String.split
:
string = "a,1\nb,4"
string |> String.split("\n") |> CSV.decode |> Enum.map fn r -> Enum.map(r, &String.upcase/1) end
Curious, what's the exact usecase?
Its working thanks.
I'm getting a error when trying to use csv on strings rather than reading from file
the contents of test_data.csv are same as string used Is there anything wrong i'm doing or are strings not supported?
PS: i'm fairly new to functional programing/elixir world.