Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Frame.X static methods from Deedle are generating warnings in VS 2017?

I downloaded the new VS 2017 yesterday and it is working fine, except that I am getting this warning on every line where I call the static method Frame.ReadCsv from the Deedle package:

FS10001 This method is not intended for use from F#

Calls to other static methods Frame.X do not generate the same warning.

Example - this line of code generates the warning:

let msft =
    Frame.ReadCsv(Config.tsDir + "MSFT.csv",
                  hasHeaders=true,
                  inferTypes=true)

Intellisense recognizes the method and provides the appropriate hints, which fit exactly with the signature in http://bluemountaincapital.github.io/Deedle/reference/deedle-frame.html

like image 589
Soldalma Avatar asked Mar 08 '17 12:03

Soldalma


Video Answer


2 Answers

This snippet works OK:

open Deedle
open System.IO

[<EntryPoint>]
let main argv =
    let csv = @"C:\tmp\testDeedle.csv"
    File.Exists csv |> printfn "%A"
    let df = Frame.ReadCsv(csv,hasHeaders=true,inferTypes=true)
    df.GetColumn("Date") |> printfn "%A"
    printfn "%A" argv
    0 // return an integer exit code
like image 192
s952163 Avatar answered Oct 06 '22 16:10

s952163


It seems you have to use ReadCsv(path="file.csv") instead of ReadCsv(location="file.csv"). The first case provides you with an interface that has option values for optional settings instead of nullables, and addresses the correct overload.

like image 30
gooney Avatar answered Oct 06 '22 18:10

gooney