Column

Column

It realizes an object to hold a table column

Constructor

new Column()

Source:
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}

Source:
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}

Source:
remove the column
Example
mydata.column('timestamp').remove();
Returns:
Type
Column

rename(szName) → {Column}

Source:
rename the column
Example
mydata.column('timestamp').rename('time');
Parameters:
Name Type Description
szName Sting the new column name
Returns:
Type
Column

uniqueValues() → {array}

Source:
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}

Source:
get the values of the column
Example
var sumArray = mydata.column('total').values();
Returns:
an array with the values of the column
Type
array