## Key

• This line was removed.
• Formatting was changed.

...

Column reference example:

SIGN
d-codelang-syntax
RawWrangle true ref true derive type:single value:
 sign(MyInteger) as:'sign_MyInteger'

sign(MyInteger)

Output:

...

Returns the

...

sign

...

of the value found in the `MyInteger` column.

Numeric literal example:

SIGN
d-codelang-syntax
RawWrangle true ref true delete row:(
 sign(MyInteger) == -1)

...

 (sign(MyInteger) == -1)

Output: Returns `true` if the sign of the entry in the `MyInteger` column is `-1`.

...

D s
snippet Syntax

SIGN
d-codelang-syntax
RawWrangle true syntax true derive type:single value:
 sign(numeric_value)

sign(numeric_value)

ArgumentRequired?Data TypeDescription
numeric_valueYDecimal or Integer Decimal or Integer literal, function returning Decimal or Integer, or name of column to apply to the function

...

XY
-24
-6.2-2
0-4.2
44
15-0.05

TransformTransformation:

You can use the following transform to derive the sign values of these columns:

d-

...

trans
RawWrangle true 'signX' step derive type:single value:

...

 sign(X) as: 'signX'

...

p01Name Formula type Single row formula Formula sign(X) New column name New formula

D trans
RawWrangle true 'signY' step derive type:single value:

...

p01Name sign(Y) as: 'signY' Formula type Single row formula Formula sign(Y) New column name New formula

Using these two columns, you can assign each set of coordinates into a quadrant. For ease of reading, the following has been broken into two separate tranformations:

d-

...

trans
RawWrangle true 'lower-right' Default value case cases: [(signX == 1) && (signY == -1),'lower-right'],[(signX == 1) && (signY == 1),'upper-right']

...

p01Name default: 'line' as: 'q1' Condition type 'line' Case 01 - Value 'q1' (signX == 1) && (signY == 1) Conditional column New column name step Case 02 - Value Case on custom conditions Case 01 - Condition (signX == 1) && (signY == -1) 'upper-right' Case 02 - Condition

D trans
RawWrangle true 'lower-left' Default value case cases: [(signX == -1) && (signY == -1),'lower-left'],[(signX == -1) && (signY == 1),'upper-left'] default: 'line' as: 'q2' Condition type 'line' Case 01 - Value 'q2' (signX == -1) && (signY == 1) Conditional column New column name step Case 02 - Value Case on custom conditions Case 01 - Condition (signX == -1) && (signY == -1) 'upper-left' Case 02 - Condition

Then, you can merge the two columns together:

D trans
RawWrangle true 'quadrant' step merge col:q1,q2 as:'quadrant' Columns q1,q2 Separator '' New column name Merge columns

Results: