Sep 0.1.0-preview.5

This is a prerelease version of Sep.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Sep --version 0.1.0-preview.5
                    
NuGet\Install-Package Sep -Version 0.1.0-preview.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Sep" Version="0.1.0-preview.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sep" Version="0.1.0-preview.5" />
                    
Directory.Packages.props
<PackageReference Include="Sep" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Sep --version 0.1.0-preview.5
                    
#r "nuget: Sep, 0.1.0-preview.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Sep&version=0.1.0-preview.5&prerelease
                    
Install Sep as a Cake Addin
#tool nuget:?package=Sep&version=0.1.0-preview.5&prerelease
                    
Install Sep as a Cake Tool

Sep - Possibly the World's Fastest .NET CSV Parser

Build Status NuGet

<img align="right" width="128px" height="128px" src="Icon.png">

Modern, minimal, blazing fast, zero allocation¹, reading and writing of separated values (csv, tsv etc.). Cross-platform, trimmable and AOT/NativeAOT compatible.

.NET 7+ only as using Generic Math, ref struct and other .NET 7+/C# 11 features.

¹ After creation and first few rows both for reading/parsing and writing/formatting.

var text = """
           A;B;C;D;E;F
           Sep;🚀;1;1.2;0.1;0.5
           CSV;✅;2;2.2;0.2;1.5
           """;

using var reader = Sep.Reader().FromText(text);  // Infers separator 'Sep' from header
using var writer = reader.Sep.Writer().ToText(); // Writer defined from reader 'Sep'
                                                 // Use .FromFile(...)/ToFile(...) for files
var idx = reader.Header.IndexOf("B");
var nms = new[] { "E", "F" };

foreach (var readRow in reader)           // Read one row at a time
{
    var a = readRow["A"].Span;            // Column as ReadOnlySpan<char>
    var b = readRow[idx].ToString();      // Column to string (allocates new string per call)
    var c = readRow["C"].Parse<int>();    // Parse any T : ISpanParsable<T>
    var d = readRow["D"].Parse<float>();  // Parse float/double fast via csFastFloat
    var s = readRow[nms].Parse<double>(); // Parse multiple columns as Span<T>
                                          // - Sep handles array allocation and reuse
    foreach (ref var v in s) { v *= 10; }

    using var writeRow = writer.NewRow(); // Start new row. Row written on Dispose.
    writeRow["A"].Set(a);                 // Set by ReadOnlySpan<char>
    writeRow["B"].Set(b);                 // Set by string
    writeRow["C"].Set($"{c * 2}");        // Set via InterpolatedStringHandler, no allocs
    writeRow["D"].Format(d / 2);          // Format any T : ISpanFormattable
    writeRow[nms].Format(s);              // Format multiple columns directly
}

var expected = """
               A;B;C;D;E;F
               Sep;🚀;2;0.6;1;5
               CSV;✅;4;1.1;2;15
               """;
Assert.AreEqual(expected, writer.ToString());

// Above example code is for demonstration purposes only.
// Short names and repeated constants are only for demonstration.
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Sep:

Package Downloads
GreatUtilities.Infrastructure

Essencial tools to agile development.

Miracatch.Detection

Provides event security analysis to Miracatch components.

Soenneker.Csv.SepCsvUtil

Using the Sep CSV library, provides methods for reading and writing CSV files using strongly-typed objects with automatic property mapping and basic type conversion

Soenneker.Blazor.SheetMapper

A Blazor component and utility library for mapping uploaded CSV or tabular files to C# objects. Supports header extraction and user-defined property mapping.

WoW2.Backbone.Data.Transportation.Cars

Global manufactured cars static data and data providers

GitHub repositories (4)

Showing the top 4 popular GitHub repositories that depend on Sep:

Repository Stars
DataDog/dd-trace-dotnet
.NET Client Library for Datadog APM
joakimskoog/AnApiOfIceAndFire
An API of Ice And Fire is the world's greatest source for quantified and structured data from the universe of Ice and Fire (as well as the HBO series Game of Thrones).
JasonBock/Rocks
A mocking library based on the Compiler APIs (Roslyn + Mocks)
nuskey8/Csv-CSharp
Fast CSV Serializer for .NET and Unity
Version Downloads Last updated
0.11.0 1,990 6/12/2025
0.10.2 16,561 5/24/2025
0.10.1 14,908 5/11/2025
0.10.0 20,916 4/22/2025
0.9.0 57,824 2/1/2025
0.8.0 22,434 1/19/2025
0.7.0 889,088 1/11/2025
0.6.0 54,856 12/2/2024
0.5.5 78,897 10/8/2024
0.5.4 18,089 9/20/2024
0.5.3 149,949 7/11/2024
0.5.2 1,624,678 4/21/2024
0.5.1 187 4/20/2024
0.5.0 13,923 4/15/2024
0.4.6 3,039 4/4/2024
0.4.5 4,209 3/28/2024
0.4.4 926 3/20/2024
0.4.3 1,669 3/10/2024
0.4.2 492 3/8/2024
0.4.1 156 3/8/2024
0.4.0 22,275 1/1/2024
0.4.0-preview.1 133 12/23/2023
0.3.0 927,349 11/18/2023
0.2.7 6,303 10/12/2023
0.2.6 514 9/27/2023
0.2.5 313 9/14/2023
0.2.4 299 9/8/2023
0.2.3 324 9/5/2023
0.2.2 475,677 8/10/2023
0.2.1 204 8/10/2023
0.2.0 1,028 8/7/2023
0.2.0-preview.3 142 7/29/2023
0.1.0 1,100 5/30/2023
0.1.0-rc.1 131 5/26/2023
0.1.0-preview.8 118 5/26/2023
0.1.0-preview.7 146 5/8/2023
0.1.0-preview.6 133 4/24/2023
0.1.0-preview.5 139 3/19/2023
0.1.0-preview.4 147 12/31/2022
0.1.0-preview.3 143 12/4/2022
0.1.0-preview.2 181 3/21/2022
0.1.0-preview.1 190 1/28/2022