Angara.Table (F#)
Angara.Table is a .NET library that provides types representing plain tables. It allows loading and saving tables and facilitates operations on tables.
A table is an immutable collection of named columns. Column values are represented as lazy one-dimensional immutable array of one of the supported types. Heights of all columns in a table are equal. Columns names are arbitrary strings; duplicate names are allowed but may cause ambiguity in some API functions.
Limiting the supported column types to relatively small types subset enables generic tools operating with tables, such as serialization services and visualization, to be able to handle all possible types.
Example
This example uses Angara.Table to create a table from numeric arrays and save the table as a CSV file:
1: 2: 3: 4: 5: 6: |
|
The following example computes an average value of the column "sinx"
:
1:
|
|
The next example views rows of the table as a sequence of the record instances:
1: 2: |
|
Finally, this example loads a table from the CSV file and extends it with a new column built from another column:
1: 2: 3: |
|
|
How to get Angara.Table
PM> Install-Package Angara.Table
Samples & Documentation
A table of Angara.Table is basically an immutable collection of named columns. The Table as Collection of Columns describes how to create a column and a table from a sequence of columns; how to add and remove columns; how to view column as an array of values and fetch an individual value from a table.
Sometimes it is necessary to view a table as a collection of rows. The Table as Collection of Rows describes how to get number of rows; how to get values of rows; how to represent table rows as a collection of typed objects.
The special case is a table having all columns of same type. The Table as Matrix describes how to create a matrix table and operate with it.
Angara.Table allows to save and load a table in the delimited text format (CSV). See Save and Load.
Angara.Table exposes a set of functions manipulating with Table
that should make a code more succinct.
These functions are described in Table Operations.
Contributing and copyright
The project is hosted on GitHub where you can report issues, fork the project and submit pull requests. If you're adding a new public API, please also consider adding samples that can be turned into a documentation. You might also want to read the library design notes to understand how it works.
The library is available under MIT license. For more information see the License file in the GitHub repository.