Skip to content

Commit

Permalink
Merge pull request #1457 from dsyme/split
Browse files Browse the repository at this point in the history
Split up FSharp.Data
  • Loading branch information
dsyme authored Aug 16, 2022
2 parents a6d11be + 94e0d27 commit cdd5533
Show file tree
Hide file tree
Showing 113 changed files with 2,154 additions and 1,549 deletions.
2 changes: 2 additions & 0 deletions .fantomasignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
paket-files/
tests/
16 changes: 12 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,22 @@ Type providers consist of two components:
CSV provider, this component does the type inference and generates types
(that are mapped to runtime components by the compiler).

We need a _runtime component_ for .NET Standard 2.0 (netstandard2.0). We also need a _design time_
component for each, to be able to host the type provider in .NET Core-based tooling.
We need _runtime components_ for .NET Standard 2.0 (netstandard2.0). We also need a _design time_
component, to be able to host the type providers in .NET Core-based tooling.

The _runtime_ components are in the following project:
The _core_ runtime components are the following projects. No type providers are activated if you reference these:

* **FSharp.Data.Http**
* **FSharp.Data.Csv.Core**
* **FSharp.Data.Html.Core**
* **FSharp.Data.Json.Core**
* **FSharp.Data.Xml.Core**

The _enhanced_ runtime component that mentions the associated the design-time component is in the following project:

* **FSharp.Data**

The _design time_ components are in the following project:
The design-time component is the following project:

* **FSharp.Data.DesignTime**

Expand Down
8 changes: 8 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,13 @@
<PackageProjectUrl>https://fsprojects.github.io/FSharp.Data</PackageProjectUrl>
<PackageIconUrl>https://raw.githubusercontent.com/fsprojects/FSharp.Data/master/docs/img/logo.png</PackageIconUrl>
<RepositoryType>git</RepositoryType>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)src\keyfile.snk</AssemblyOriginatorKeyFile>
<PublicSign>false</PublicSign>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<EnableSourceLink>true</EnableSourceLink>
<DebugType>Embedded</DebugType>
</PropertyGroup>
</Project>
84 changes: 62 additions & 22 deletions FSharp.Data.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.16
# Visual Studio Version 17
VisualStudioVersion = 17.4.32814.64
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{7E48C05A-8C42-4871-A618-180BEEF696AA}"
ProjectSection(SolutionItems) = preProject
Expand Down Expand Up @@ -53,17 +53,17 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ja", "ja", "{CA5C64CE-E68C-4320-A00A-E67CA883B9D2}"
ProjectSection(SolutionItems) = preProject
docs\ja\contributing.md = docs\ja\contributing.md
docs\ja\fsharpdata.md = docs\ja\fsharpdata.md
docs\ja\index.md = docs\ja\index.md
docs\ja\library\CsvFile.fsx = docs\ja\library\CsvFile.fsx
docs\ja\library\CsvProvider.fsx = docs\ja\library\CsvProvider.fsx
docs\ja\fsharpdata.md = docs\ja\fsharpdata.md
docs\ja\library\Http.fsx = docs\ja\library\Http.fsx
docs\ja\index.md = docs\ja\index.md
docs\ja\library\JsonProvider.fsx = docs\ja\library\JsonProvider.fsx
docs\ja\tutorials\JsonToXml.fsx = docs\ja\tutorials\JsonToXml.fsx
docs\ja\library\JsonValue.fsx = docs\ja\library\JsonValue.fsx
docs\tools\templates\ja\template.cshtml = docs\tools\templates\ja\template.cshtml
docs\ja\library\WorldBank.fsx = docs\ja\library\WorldBank.fsx
docs\ja\library\XmlProvider.fsx = docs\ja\library\XmlProvider.fsx
docs\ja\tutorials\JsonToXml.fsx = docs\ja\tutorials\JsonToXml.fsx
docs\tools\templates\ja\template.cshtml = docs\tools\templates\ja\template.cshtml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{36E72EB1-5847-4B38-8993-B951648CB0D9}"
Expand All @@ -77,21 +77,32 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProjectSection
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data", "src\FSharp.Data\FSharp.Data.fsproj", "{6EBFDE55-9687-40A9-8C1A-6E204ECB117F}"
ProjectSection(ProjectDependencies) = postProject
{B85F245B-3FB9-4253-8251-16F98F05B6EC} = {B85F245B-3FB9-4253-8251-16F98F05B6EC}
EndProjectSection
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.DesignTime", "src\FSharp.Data.DesignTime\FSharp.Data.DesignTime.fsproj", "{B85F245B-3FB9-4253-8251-16F98F05B6EC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{1F33D53A-C007-408C-AF6C-B7D62288F941}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Data.Reference.Tests", "tests\FSharp.Data.Reference.Tests\FSharp.Data.Reference.Tests.fsproj", "{DE36F8D0-7895-4ABD-9755-921F1BEAD3C9}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.Reference.Tests", "tests\FSharp.Data.Reference.Tests\FSharp.Data.Reference.Tests.fsproj", "{DE36F8D0-7895-4ABD-9755-921F1BEAD3C9}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.Core.Tests", "tests\FSharp.Data.Core.Tests\FSharp.Data.Core.Tests.fsproj", "{1746A3E0-32A2-49A7-9C8A-A0BCB52683B0}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.DesignTime.Tests", "tests\FSharp.Data.DesignTime.Tests\FSharp.Data.DesignTime.Tests.fsproj", "{A5B31ACC-56FB-4EC2-917F-BEB3754EF9AC}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Data.Tests", "tests\FSharp.Data.Tests\FSharp.Data.Tests.fsproj", "{1746A3E0-32A2-49A7-9C8A-A0BCB52683B0}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSharp.Data.Core.Tests.CSharp", "tests\FSharp.Data.Core.Tests.CSharp\FSharp.Data.Core.Tests.CSharp.csproj", "{290FED0C-D7C8-486F-AACF-3D7A1304C863}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Data.DesignTime.Tests", "tests\FSharp.Data.DesignTime.Tests\FSharp.Data.DesignTime.Tests.fsproj", "{A5B31ACC-56FB-4EC2-917F-BEB3754EF9AC}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.Json.Core", "src\FSharp.Data.Json.Core\FSharp.Data.Json.Core.fsproj", "{DAEBFBCF-84CD-40BB-B8F6-99B1A9C4641F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FSharp.Data.Tests.CSharp", "tests\FSharp.Data.Tests.CSharp\FSharp.Data.Tests.CSharp.csproj", "{290FED0C-D7C8-486F-AACF-3D7A1304C863}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.Tests", "tests\FSharp.Data.Tests\FSharp.Data.Tests.fsproj", "{750148EC-6A05-421D-96A4-E5AC9D18AF58}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.DesignTime", "src\FSharp.Data.DesignTime\FSharp.Data.DesignTime.fsproj", "{44E0DF97-D8FD-4805-8A84-B888D9589C8A}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.Html.Core", "src\FSharp.Data.Html.Core\FSharp.Data.Html.Core.fsproj", "{E91BF68E-257C-43E6-BDE9-672D4E3BFAFA}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.Http", "src\FSharp.Data.Http\FSharp.Data.Http.fsproj", "{29EDED03-D2D6-415C-A17D-00806C52035A}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.Xml.Core", "src\FSharp.Data.Xml.Core\FSharp.Data.Xml.Core.fsproj", "{1ECEFFEE-1040-40ED-9EB5-CE720A33058D}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.Csv.Core", "src\FSharp.Data.Csv.Core\FSharp.Data.Csv.Core.fsproj", "{0A1B8B61-268D-4061-B567-A47141C608E4}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.WorldBank.Core", "src\FSharp.Data.WorldBank.Core\FSharp.Data.WorldBank.Core.fsproj", "{A69D007B-EAF0-4866-A8B4-A2EDF2614E56}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -103,10 +114,6 @@ Global
{6EBFDE55-9687-40A9-8C1A-6E204ECB117F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6EBFDE55-9687-40A9-8C1A-6E204ECB117F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6EBFDE55-9687-40A9-8C1A-6E204ECB117F}.Release|Any CPU.Build.0 = Release|Any CPU
{B85F245B-3FB9-4253-8251-16F98F05B6EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B85F245B-3FB9-4253-8251-16F98F05B6EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B85F245B-3FB9-4253-8251-16F98F05B6EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B85F245B-3FB9-4253-8251-16F98F05B6EC}.Release|Any CPU.Build.0 = Release|Any CPU
{DE36F8D0-7895-4ABD-9755-921F1BEAD3C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DE36F8D0-7895-4ABD-9755-921F1BEAD3C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DE36F8D0-7895-4ABD-9755-921F1BEAD3C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -123,17 +130,50 @@ Global
{290FED0C-D7C8-486F-AACF-3D7A1304C863}.Debug|Any CPU.Build.0 = Debug|Any CPU
{290FED0C-D7C8-486F-AACF-3D7A1304C863}.Release|Any CPU.ActiveCfg = Release|Any CPU
{290FED0C-D7C8-486F-AACF-3D7A1304C863}.Release|Any CPU.Build.0 = Release|Any CPU
{DAEBFBCF-84CD-40BB-B8F6-99B1A9C4641F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DAEBFBCF-84CD-40BB-B8F6-99B1A9C4641F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DAEBFBCF-84CD-40BB-B8F6-99B1A9C4641F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DAEBFBCF-84CD-40BB-B8F6-99B1A9C4641F}.Release|Any CPU.Build.0 = Release|Any CPU
{750148EC-6A05-421D-96A4-E5AC9D18AF58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{750148EC-6A05-421D-96A4-E5AC9D18AF58}.Debug|Any CPU.Build.0 = Debug|Any CPU
{750148EC-6A05-421D-96A4-E5AC9D18AF58}.Release|Any CPU.ActiveCfg = Release|Any CPU
{750148EC-6A05-421D-96A4-E5AC9D18AF58}.Release|Any CPU.Build.0 = Release|Any CPU
{44E0DF97-D8FD-4805-8A84-B888D9589C8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{44E0DF97-D8FD-4805-8A84-B888D9589C8A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{44E0DF97-D8FD-4805-8A84-B888D9589C8A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{44E0DF97-D8FD-4805-8A84-B888D9589C8A}.Release|Any CPU.Build.0 = Release|Any CPU
{E91BF68E-257C-43E6-BDE9-672D4E3BFAFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E91BF68E-257C-43E6-BDE9-672D4E3BFAFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E91BF68E-257C-43E6-BDE9-672D4E3BFAFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E91BF68E-257C-43E6-BDE9-672D4E3BFAFA}.Release|Any CPU.Build.0 = Release|Any CPU
{29EDED03-D2D6-415C-A17D-00806C52035A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{29EDED03-D2D6-415C-A17D-00806C52035A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{29EDED03-D2D6-415C-A17D-00806C52035A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{29EDED03-D2D6-415C-A17D-00806C52035A}.Release|Any CPU.Build.0 = Release|Any CPU
{1ECEFFEE-1040-40ED-9EB5-CE720A33058D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1ECEFFEE-1040-40ED-9EB5-CE720A33058D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1ECEFFEE-1040-40ED-9EB5-CE720A33058D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1ECEFFEE-1040-40ED-9EB5-CE720A33058D}.Release|Any CPU.Build.0 = Release|Any CPU
{0A1B8B61-268D-4061-B567-A47141C608E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A1B8B61-268D-4061-B567-A47141C608E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A1B8B61-268D-4061-B567-A47141C608E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A1B8B61-268D-4061-B567-A47141C608E4}.Release|Any CPU.Build.0 = Release|Any CPU
{A69D007B-EAF0-4866-A8B4-A2EDF2614E56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A69D007B-EAF0-4866-A8B4-A2EDF2614E56}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A69D007B-EAF0-4866-A8B4-A2EDF2614E56}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A69D007B-EAF0-4866-A8B4-A2EDF2614E56}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {34E4FA16-B344-439D-A789-1E8355E5659F}
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{DE36F8D0-7895-4ABD-9755-921F1BEAD3C9} = {1F33D53A-C007-408C-AF6C-B7D62288F941}
{1746A3E0-32A2-49A7-9C8A-A0BCB52683B0} = {1F33D53A-C007-408C-AF6C-B7D62288F941}
{A5B31ACC-56FB-4EC2-917F-BEB3754EF9AC} = {1F33D53A-C007-408C-AF6C-B7D62288F941}
{290FED0C-D7C8-486F-AACF-3D7A1304C863} = {1F33D53A-C007-408C-AF6C-B7D62288F941}
{750148EC-6A05-421D-96A4-E5AC9D18AF58} = {1F33D53A-C007-408C-AF6C-B7D62288F941}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {34E4FA16-B344-439D-A789-1E8355E5659F}
EndGlobalSection
EndGlobal
10 changes: 10 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
### 5.0.1 - Aug 15 2022

* There are now multiple packages
* FSharp.Data -- includes everything
* FSharp.Data.Http -- http types/helpers
* FSharp.Data.Csv.Core -- csv types/helpers
* FSharp.Data.Json.Core -- json types/helpers
* FSharp.Data.Html.Core -- html types/helpers
* FSharp.Data.Xml.Core -- xml types/helpers

### 4.2.10 - Aug 12 2022

* Implement "inline schemas": ability to add type hints into the type providers' source documents by @mlaily in https://github.com/fsprojects/FSharp.Data/pull/1447
Expand Down
29 changes: 15 additions & 14 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,15 @@ let summary = "Library of F# type providers and data access tools"

let description =
"""
The FSharp.Data package contains type providers and utilities to access
common data formats (CSV, HTML, JSON and XML in your F# applications and scripts. It also
contains helpers for parsing CSV, HTML and JSON files and for sending HTTP requests."""
The FSharp.Data packages contain type providers and utilities to access
common data formats (CSV, HTML, JSON and XML in your F# applications and scripts.
* FSharp.Data -- includes everything
* FSharp.Data.Http -- http types/helpers
* FSharp.Data.Csv.Core -- csv types/helpers
* FSharp.Data.Json.Core -- json types/helpers
* FSharp.Data.Html.Core -- html types/helpers
* FSharp.Data.Xml.Core -- xml types/helpers"""

let tags =
"F# fsharp data typeprovider WorldBank CSV HTML CSS JSON XML HTTP linqpad-samples"
Expand Down Expand Up @@ -120,9 +126,9 @@ Target.create "RunTests" (fun _ ->
"FSharp.Data.sln" |> DotNet.test setParams)

// --------------------------------------------------------------------------------------
// Build a NuGet package
// Build packages

Target.create "NuGet" (fun _ ->
Target.create "Pack" (fun _ ->
// Format the release notes
let releaseNotes = release.Notes |> String.concat "\n"

Expand All @@ -136,20 +142,15 @@ Target.create "NuGet" (fun _ ->
("PackageLicenseExpression", license)
("PackageReleaseNotes", releaseNotes)
("Summary", summary)
("PackageDescription", description)
("EnableSourceLink", "true")
("PublishRepositoryUrl", "true")
("EmbedUntrackedSources", "true")
("IncludeSymbols", "true")
("SymbolPackageFormat", "snupkg") ]
("PackageDescription", description) ]

DotNet.pack
(fun p ->
{ p with
Configuration = DotNet.BuildConfiguration.Release
OutputPath = Some "bin"
MSBuildParams = { p.MSBuildParams with Properties = properties } })
"src/FSharp.Data/FSharp.Data.fsproj")
"FSharp.Data.sln")

// --------------------------------------------------------------------------------------
// Generate the documentation
Expand Down Expand Up @@ -178,7 +179,7 @@ Target.create "Help" (fun _ ->
printfn " * Build"
printfn " * RunTests"
printfn " * GenerateDocs"
printfn " * NuGet (creates package only, doesn't publish)"
printfn " * Pack (creates package only, doesn't publish)"
printfn " * All (calls previous 5)"
printfn ""
printfn " Other targets:"
Expand Down Expand Up @@ -228,7 +229,7 @@ Target.create "All" ignore
==> "GenerateDocs"
==> "All"

"Build" ==> "NuGet" ==> "All"
"Build" ==> "Pack" ==> "All"
"Build" ==> "All"
"Build" ==> "RunTests" ==> "All"

Expand Down
22 changes: 13 additions & 9 deletions docs/library/CsvFile.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,20 @@ index: 2
---
*)
(*** condition: prepare ***)
#r "../../src/FSharp.Data/bin/Release/netstandard2.0/FSharp.Data.Http.dll"
#r "../../src/FSharp.Data/bin/Release/netstandard2.0/FSharp.Data.Csv.Core.dll"
#r "../../src/FSharp.Data/bin/Release/netstandard2.0/FSharp.Data.dll"
(*** condition: fsx ***)
#if FSX
#r "nuget: FSharp.Data,{{fsdocs-package-version}}"
#endif // FSX
#endif
(*** condition: ipynb ***)
#if IPYNB
#r "nuget: FSharp.Data,{{fsdocs-package-version}}"

Formatter.SetPreferredMimeTypesFor(typeof<obj>, "text/plain")
Formatter.Register(fun (x:obj) (writer: TextWriter) -> fprintfn writer "%120A" x )
#endif // IPYNB
Formatter.Register(fun (x: obj) (writer: TextWriter) -> fprintfn writer "%120A" x)
#endif
(**
[![Binder](../img/badge-binder.svg)](https://mybinder.org/v2/gh/fsprojects/FSharp.Data/gh-pages?filepath={{fsdocs-source-basename}}.ipynb)&emsp;
[![Script](../img/badge-script.svg)]({{root}}/{{fsdocs-source-basename}}.fsx)&emsp;
Expand Down Expand Up @@ -48,12 +50,14 @@ points to a live CSV file on the Yahoo finance web site:
*)

// Download the stock prices
let msft = CsvFile.Load(__SOURCE_DIRECTORY__ + "/../data/MSFT.csv").Cache()
let msft =
CsvFile
.Load(__SOURCE_DIRECTORY__ + "/../data/MSFT.csv")
.Cache()

// Print the prices in the HLOC format
for row in msft.Rows |> Seq.truncate 10 do
printfn "HLOC: (%s, %s, %s)"
(row.GetColumn "High") (row.GetColumn "Low") (row.GetColumn "Date")
printfn "HLOC: (%s, %s, %s)" (row.GetColumn "High") (row.GetColumn "Low") (row.GetColumn "Date")

(*** include-fsi-merged-output ***)
(**
Expand Down Expand Up @@ -92,8 +96,7 @@ The following example shows how to process the sample previous CSV sample using
open FSharp.Data.CsvExtensions

for row in msft.Rows |> Seq.truncate 10 do
printfn "HLOC: (%f, %M, %O)"
(row.["High"].AsFloat()) (row?Low.AsDecimal()) (row?Date.AsDateTime())
printfn "HLOC: (%f, %M, %O)" (row.["High"].AsFloat()) (row?Low.AsDecimal()) (row?Date.AsDateTime())

(*** include-fsi-merged-output ***)

Expand All @@ -108,7 +111,8 @@ separator and quote characters when saving.
*)

// Saving the first 10 stock prices where the closing price is higher than the opening price in TSV format:
msft.Filter(fun row -> row?Close.AsFloat() > row?Open.AsFloat())
msft
.Filter(fun row -> row?Close.AsFloat() > row?Open.AsFloat())
.Truncate(10)
.SaveToString('\t')

Expand Down
Loading

0 comments on commit cdd5533

Please sign in to comment.