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

廉价感情. 提交于 2019-12-30 17:45:39

问题


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


回答1:


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



回答2:


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.



来源:https://stackoverflow.com/questions/42671973/why-frame-x-static-methods-from-deedle-are-generating-warnings-in-vs-2017

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!