|
|
| DataFrameView (global::System.IntPtr cPtr, bool cMemoryOwn) |
| |
|
virtual DataFrameCapabilitySet | GetCapabilities () |
| | Return the view's capabilities.
|
| |
| virtual Vector2u64 | GetShape () |
| | Return the shape of the data frame.
|
| |
| virtual string | ColumnName (uint index) |
| | Get the name of a column from its index.
|
| |
| virtual uint | ColumnIndex (string name) |
| | Get the index of a column from its name.
|
| |
| virtual DataType | ColumnDataType (uint index) |
| | Return the data type of the column.
|
| |
| unsafe void | Read (uint column, uint offset, uint count, byte[] dst) |
| | Read data from a column.
|
| |
|
string | Unit (uint columnIndex) |
| |
| unsafe void | Write (uint column, uint offset, uint count, byte[] src) |
| | Write data into a column.
|
| |
|
void | SetUnit (uint columnIndex, string unit) |
| |
| virtual void | AddColumn (string name, DataType dtype) |
| | Add a column to the dataframe.
|
| |
| virtual void | AddRows (uint offset, uint count) |
| | Insert rows at the specified position.
|
| |
| virtual void | RemoveColumn (uint index) |
| | Remove a column.
|
| |
| virtual void | RemoveRows (uint offset, uint count) |
| | Remove a continuous set of rows.
|
| |
|
string | ToString () |
| | Return a string representation.
|
| |
| void | Reshape (Vector2u64 shape, string[] columnNames, DataType[] columnDataTypes) |
| | Method to reshape a DataFrame.
|
| |
|
unsafe void | Read (uint column, uint offset, uint count, string[] dst) |
| |
|
unsafe void | Write (uint column, uint offset, uint count, string[] src) |
| |
|
| View (global::System.IntPtr cPtr, bool cMemoryOwn) |
| |
|
void | Dispose () |
| |
| T | Extension< T > () |
| | Get an extension, with automatic upcasting.
|
| |
| virtual Extension | Extension (uint id) |
| | Get an extension of the view, corresponding to the given identifier.
|
| |
|
ViewOriginExtension | ViewOrigin () |
| | Shortcut to access to ViewOrigin extension.
|
| |
View to model tabular data.
This view is composed of a set of columns, that have a name and a data type. A column's name is unique, and columns in a dataframe can have different data types.
Each column has the same number of elements. The aggregate of all n-th elements of columns are a row of the dataframe.
- Examples
- CreateDataFrame.cs.
| unsafe void IOLink.DataFrameView.Read |
( |
uint |
column, |
|
|
uint |
offset, |
|
|
uint |
count, |
|
|
byte[] |
dst |
|
) |
| |
|
inline |
Read data from a column.
This method requires the READ capability.
When reading numeric data, the dst buffer will be filled with continuous values. In the case of strings, it will be a continuous array of string objects.
The destination buffer must be allocated by the user. If its size is under the byte count needed to store the request number of elements, a segmentation fault will rise, as there is no boundaries check.
- Parameters
-
| column | The index of the column to read from. |
| offset | The index of the first element to read. |
| count | The number of elements to read. |
| dst | A buffer where the read data will be written. |
- Exceptions
-
| NotImplemented | When the view does not support reading. |
| Error | When dst is null. |
| Error | When the column index is invalid. |
| Error | When offset is out of bounds. |
| Error | If it is impossible to read the number of elements required. |
| void IOLink.DataFrameView.Reshape |
( |
Vector2u64 |
shape, |
|
|
string[] |
columnNames, |
|
|
DataType[] |
columnDataTypes |
|
) |
| |
|
inline |
Method to reshape a DataFrame.
This method requires the RESHAPE capability.
All the dataframe's data is invalidated after this operation.
- Parameters
-
| shape | shape of the allocated dataframe (column count, row count) |
| columnNames | Array which contains the name for each column |
| columnDataTypes | Array which contains the data type of each column |
No check is done on inputs. Pass arguments very carefully. columnNames and columnDataTypes shall have the same element count, and their size must be equal to shape[0].
column count and row count cannot be 0.
| unsafe void IOLink.DataFrameView.Write |
( |
uint |
column, |
|
|
uint |
offset, |
|
|
uint |
count, |
|
|
byte[] |
src |
|
) |
| |
|
inline |
Write data into a column.
This method requires the WRITE capability.
When writing numeric data, the src buffer must be filled with continuous values. In the case of strings, the source must use a continuous array of string objects.
The source buffer must be allocated by the user. If its size is under the byte count needed to store the request number of elements, a segmentation fault will rise, as there is no boundaries check.
- Parameters
-
| column | The index of the column to write into. |
| offset | The index of the first element to write. |
| count | The number of element to write. |
| src | A buffer whose content will be written in the column. |
- Exceptions
-
| NotImplemented | When the view does not support writing. |
| Error | When src is null. |
| Error | When the column index is invalid. |
| Error | When offset is out of bounds. |
| Error | If it is impossible to write the number of elements required. |