I'm having an issue with the F# CSV Type provider and getting a type mismatch. I'm new to F#, so it very well could be a basic issue. I have put the file up on blob storage so you can replicate easier. https://analyzethis.blob.core.windows.net/voterinfo/WakeCountyVoterCSV note: you will need to change the providers file location to your download location to replicate exactly. You may be able to load dynamically from blob as well.
The error I get is:
Type mismatch: Expecting a seq< CsvProvider<...>.Row> -> int
but given a
seq< CsvProvider<...>.Row> -> unit
Type int does not match unit
code:
open FSharp.Data
type voterType = CsvProvider<"C:\\Users\\dacrook\\Documents\\vrdb\\VoterCSVData2.csv", AssumeMissingValues=true, MissingValues="">
[<EntryPoint>]
let main argv =
let voterData = voterType.Parse("C:\\Users\\dacrook\\Documents\\vrdb\\VoterCSVData2.csv")
voterData.Rows |> Seq.iter(fun r -> printfn "%A" r)
Any assistance is greatly appreciated!
Thanks,
~David