dataFrame.column.encode — sha()

Description

The sha() method of the encode object returns the values of the selected column hashed using the specified SHA algorithm.

Signature

dataFrame.columns(columnNames).encode.sha({ method: 'sha256' })
Scope
dataFrame
Family
encode
Returns
array

Argument

columnNames ( string[] )
The name of the column containing the values to encode.
options (object)
Hashing options.

Option

method (string)
The SHA algorithm to use, between sha1 and sha256 (default).

Returns

mask ( string[] )
An array containing the hashed values.

Example

// hash values from a column of the dataFrame
var mask = dataFrame.column('col_1').encode.sha({ method: 'sha256' });

// add encoded values to the dataFrame
dataFrame.column('values').set(mask);