-
-
Save jovaneyck/dcb879cb509e986fbe498f0f3e28876e to your computer and use it in GitHub Desktop.
Read a CSV file with CsvProvider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r @"..\packages\FSharp.Data\lib\net40\Fsharp.Data.dll" | |
open FSharp.Data | |
let [<Literal>] csvPath = ".\goodreads_library_export.csv" | |
type File = CsvProvider<csvPath> | |
let excel = new File() | |
excel.Rows | |
|> Seq.sortByDescending (fun book -> book.``Average Rating``) | |
|> Seq.take 10 | |
|> Seq.map (fun book -> book.``Average Rating``, book.Title) | |
|> Seq.iter (printfn "%A") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment