Class Table
Class to read the data from CSV file and store it as Indexers.
Inheritance
Inherited Members
Namespace: Syncfusion.PMML
Assembly: Syncfusion.PMML.Base.dll
Syntax
public class Table
Constructors
Table(Int32, Int32)
Declaration
public Table(int rowCount, int columnCount)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowCount | |
System.Int32 | columnCount |
Table(Stream, Boolean, Char)
Creates an instance for Table
Declaration
public Table(Stream stream, bool containsHeaderRow, char separator)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | File stream |
System.Boolean | containsHeaderRow | Contains header row |
System.Char | separator | Data separator |
Table(String, Boolean, Char)
Declaration
public Table(string filepath, bool containsHeaderRow, char separator)
Parameters
Type | Name | Description |
---|---|---|
System.String | filepath | |
System.Boolean | containsHeaderRow | |
System.Char | separator |
Properties
ColumnCount
Get the ColumnCount of the Table
Declaration
public int ColumnCount { get; }
Property Value
Type |
---|
System.Int32 |
ColumnNames
Get and set the ColumnNames of the Table
Declaration
public string[] ColumnNames { get; }
Property Value
Type |
---|
System.String[] |
Item[Int32]
Get and Set RowValue based on the RowIndex
Declaration
public object[] this[int rowIndex] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | RowIndex of Table |
Property Value
Type | Description |
---|---|
System.Object[] | Row Elements |
Item[Int32, Int32]
Get and Set CellValue based on the Row and Column Index
Declaration
public object this[int rowIndex, int columnIndex] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | RowIndex of Table |
System.Int32 | columnIndex | ColumnIndex of Table |
Property Value
Type | Description |
---|---|
System.Object | CellValue |
Item[Int32, String]
Get CellValue based on the RowIndex and ColumnName
Declaration
public object this[int rowIndex, string columnName] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | RowIndex of Table |
System.String | columnName |
Property Value
Type | Description |
---|---|
System.Object | CellValue |
RowCount
Get the RowCount of the Table
Declaration
public int RowCount { get; }
Property Value
Type |
---|
System.Int32 |
Methods
ConvertToDataTable()
Convert the table object into DataTable
Declaration
public DataTable ConvertToDataTable()
Returns
Type | Description |
---|---|
System.Data.DataTable | DataTable |
Dispose()
Disposes the class values
Declaration
public void Dispose()
WriteToCSV(StreamWriter, Boolean, Char)
Wtite the Predicted Results to a CSV file
Declaration
public void WriteToCSV(StreamWriter streamWriter, bool header, char seperator)
Parameters
Type | Name | Description |
---|---|---|
System.IO.StreamWriter | streamWriter | Stream to write the Table Data |
System.Boolean | header | Boolean property to enable /disable to write the Header in CSV file |
System.Char | seperator | Char to specify the seperator |
WriteToCSV(String, Boolean, Char)
Wtite the Predicted Results to a CSV file
Declaration
public void WriteToCSV(string filepath, bool header, char seperator)
Parameters
Type | Name | Description |
---|---|---|
System.String | filepath | File path to write the Table Data |
System.Boolean | header | Boolean property to enable /disable to write the Header in CSV file |
System.Char | seperator | Char to specify the seperator |