Created
May 6, 2021 19:18
-
-
Save matthewcrews/55c86ccf642c344ac6385bc31b29e062 to your computer and use it in GitHub Desktop.
CsvProvider failing on 2 column data
This file contains hidden or 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 "nuget: FSharp.Data, 4.1.1" | |
open FSharp.Data | |
type TimeData = CsvProvider<"ExampleDates.csv"> | |
let data = TimeData.Load $"{__SOURCE_DIRECTORY__}\\ExampleDates.csv" | |
let analysis = | |
data.Rows | |
|> Seq.map (fun row -> row.ExampleDateTime.Hour) | |
|> Seq.groupBy id | |
|> Seq.map (fun (hour, grp) -> hour, Seq.length grp) |
This file contains hidden or 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
ExampleId | ExampleDateTime | |
---|---|---|
ABC001 | 2020-02-14 02:00:00.000 | |
ABC002 | 2021-01-03 16:30:00.000 | |
ABC003 | 2021-03-17 05:00:00.000 | |
ABC004 | 2021-05-05 21:00:00.000 | |
ABC005 | 2021-05-04 08:00:00.000 | |
ABC006 | 2021-05-03 10:00:00.000 | |
ABC007 | 2021-05-06 06:00:00.000 | |
ABC008 | 2021-05-06 04:00:00.000 | |
ABC009 | 2021-05-06 04:00:00.000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This fails on line 10 saying: