Constructor
new Column()
Create a new Data.Column instance.
it is generally created by the .column() method of Data.table object
it provides ther methods to access or process the values of one column of the data table
Example
var myColumn = mydata.column('timestamp');
Returns:
A new Data.Column object
Methods
map(function(currVal)) → {Column}
map the values of the column
Example
mydata.column('timestamp').map(
function(value){
var d = new Date(value);
return( String(d.getDate()) + "." + String(d.getMonth()+1) + "." + String(d.getFullYear()) );
});
Parameters:
| Name | Type | Description |
|---|---|---|
function(currVal) |
function | the user function to map the column values |
Returns:
- Type
- Column
remove() → {Column}
remove the column
Example
mydata.column('timestamp').remove();
Returns:
- Type
- Column
rename(szName) → {Column}
rename the column
Example
mydata.column('timestamp').rename('time');
Parameters:
| Name | Type | Description |
|---|---|---|
szName |
Sting | the new column name |
Returns:
- Type
- Column
uniqueValues() → {array}
get the values of the column
Example
var sumArray = mydata.column('total').values();
Returns:
an array with the values of the column
- Type
- array
values() → {array}
get the values of the column
Example
var sumArray = mydata.column('total').values();
Returns:
an array with the values of the column
- Type
- array