9

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

Soldalma
  • 4,636
  • 3
  • 25
  • 38
  • That is a weird error. I tested and it works, with FSharp.Core 4.4.1.0 and Deedle.1.2.5, targeting .NET 4.6.2 (although I doubt it matters). I do not get any intellisense errors or warnings. Both the exe and FSI works fine. – s952163 Mar 08 '17 at 23:45
  • 1
    It's coming from [this attribute](https://github.com/BlueMountainCapital/Deedle/blob/d4acfa54f4112ac8143db9ba55b138fcff2b8c10/src/Deedle/FrameExtensions.fs#L91) on `ReadCsv`, but no idea why. Beause isHidden is true, it shouldn't show up (I think). – s952163 Mar 09 '17 at 00:23
  • 1
    Not just Visual Studio -- getting that in mono on F# 4.1. – Gastove Mar 30 '17 at 05:39

2 Answers2

2

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
s952163
  • 6,276
  • 4
  • 23
  • 47
1

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.

gooney
  • 11
  • 1