You are viewing content for 5.1 | 5.0 | 4.9 | 4.8 | 4.7 | 4.6 | 4.5 | 4.4 | 4.3 | Previous Releases


bin

Returns one of two strings based on whether a value exceeds a threshold or not.

Example

Mark the employees with employee number below 4 with the “low” string and those with employee number 4 or above with the “high” string.

bin(INCORTA.ADMIN_EMP.EMPNO, "low", 4, "high")

Syntax

bin(series, label_a, limit, label_b)

Parameters

  • series: series or column of int values to be divided into two groups
  • label_a: string label to apply to series values less than limit
  • limit: int value marking the division between the two bins
  • label_b: string label to apply to series values greater than or equal to limit

Returns

string

Description

bin sorts a series of integers and labels them in one of two ways based on a threshold value. Parameter limit is the threshold value. For values of series that are less than limit, label_a is returned. For values of series greater than or equal to limit label_b is returned.

© Incorta, Inc. All Rights Reserved.