fslaborg / Deedle

Easy to use .NET library for data and time series manipulation and for scientific programming
http://fslab.org/Deedle/
BSD 2-Clause "Simplified" License
924 stars 196 forks source link

Optionalvalue ignores culture #544

Open jim108dev opened 2 years ago

jim108dev commented 2 years ago

For example

#r "nuget: Deedle"

open Deedle
open System.IO
open System

type Person = 
    { Name:string; Age:float; Bmi: OptionalValue<float>}

let peopleRecds = [ { Name = "Joe"; Age = 0.3372643363809795; Bmi = OptionalValue 0.3372643363809795 }]

let df = Frame.ofRecords peopleRecds

[<Literal>]
let outputPath = __SOURCE_DIRECTORY__ + "/data/output/"

[<Literal>]
let separator = ';'

let culture = Globalization.CultureInfo("de-DE")

df.SaveCsv(Path.Combine(outputPath, "foo.csv"), includeRowKeys = false, separator = ';',culture = culture)

results in

Name;Age;Bmi
Joe;"0,3372643363809795";0.3372643363809795