dataFrame.column.compare — isNumeric()

Description

The isNumeric() method of the compare object returns a boolean mask indicating which values are numeric.

Signature

dataFrame.column(columnName).compare.isNumeric()
Scope
column
Family
compare
Returns
mask

Argument

columnName (string)
The name of the column to compare values from.

Returns

mask ( boolean[] )
A boolean mask indicating the rows whose values are numeric.
  • Numeric value: 1
  • Otherwise: 0

Example

// get the mask of rows where the column 'age' is numeric
var mask = df.column('age').compare.isNumeric();

// set mask to dataFrame
df.column('age_numeric').set(mask);