Data Forms
DolphinDB has the following data forms:
Data Form Name |
Example |
---|---|
scalar |
5, 1.3, 2012.11.15, `hello |
vector |
5 4 8 or [5, 4, 8] |
pair |
3:5; ‘a’:’c’; “Tom”:”John” |
matrix |
1..6$2:3 or reshape(1..6, 2:3) matrix: matrix indexed matrix: setIndexedMatrix! indexed series: indexedSeries / setIndexedSeries! |
set |
|
dictionary |
|
table |
in-memory table: table DFS table: createPartitionedTable indexed table: indexedTable keyed table: keyedTable stream table: streamTable high-availability stream table: haStreamTable mvcc table: mvccTable |
Use function form to get the data form ID of a variable or constant.
$ form false;
0
$ form `TEST;
0
$ form `t1`t2`t3;
1
$ form 1 2 3;
1
$ x= 1 2 3
$ if(form(x) == VECTOR){y=1};
$ y;
1
$ form 1..6$2:3;
3