f# - Deedle series.ValuesAll raise Error: OptionalValue.Value: Value is not available -


the valuesall function of deedle series according doco

returns collection of values, including possibly missing values. note length of sequence matches `keys` sequence. 

however following code raise error optionalvalue.value: not available. expected behaviour? expecting valuesall can return double.nan

#i "..\..\packages\deedle.1.2.4" #load "deedle.fsx" open system open system.globalization open system.collections.generic open deedle  let ts = [datetime.now.date => double.nan; datetime.now.date.adddays(1.0) => 1.0] |> series ts.print() ts.valuesall >  27/01/16 12:00:00 -> <missing>  28/01/16 12:00:00 -> 1            val ts : series<datetime,float> =  27/01/16 12:00:00 -> <missing>  28/01/16 12:00:00 -> 1           val : seq<float>  > ts.valuesall ;; val : seq<float> = error: optionalvalue.value: value not available >  

there different implementations valuesall here , c#-friendly valuesall here. latter 1 accesses .value property of optional value , signature seq<float>, not seq<float opt>. either implementation or docs not consistent here.

when used deedle filtered series |> series.dropmissing quick workaround when needed present values.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -