fsprojects / FSharp.Data

F# Data: Library for Data Access
https://fsprojects.github.io/FSharp.Data
Other
814 stars 288 forks source link

CsvProvider a way to not pass all other columns to transform a row #1431

Open zetashift opened 2 years ago

zetashift commented 2 years ago

So one can transform a row using Map: http://fsprojects.github.io/FSharp.Data/library/CsvProvider.html#Transforming-CSV-files

But using that method you'd also have to explicitly pass long all other row values, in the correct order. Could a helper method be provided that returns an updated row value given the column name(s) and value(s), without having to explicitly pass along all row values?

One can currently deal with this by making a record type that models your data and then defining a function that converts a myCsv.Row -> MyRecord, but I think this would make Map a lot more ergonomic.