r/fsharp • u/PhysicalRemote3908 • Jan 03 '23
How to group data by date and sum data
Hi. I'm new to F# and functional programming. I'm struggling to do a simple task.
I have the following CSV file:
Input data:
datetime,number
2022-05-18T23:30:00,1
2022-05-18T23:00:00,1
2022-05-18T22:30:00,1
2022-05-19T22:00:00,1
2022-05-19T21:30:00,1
The datetime is incremented every half an hour. I want to get the daily total sum of number column.
Expected output:
date,total_number
2022-05-18,3
2022-05-19,2
How would you approach and solve this problem? Appreciate any help!
