Data Wrangling with Python Datatable - Conditional Statements
Transformation based on a Single Condition
Source data
Task: if c is positive, then value should be a - b, else b - a.
from datatable import dt, f, update, ifelse
df = dt.Frame({"a": [1, 1, 2, 4],
"b": [2, 2, 3, 2],
"...
datawrangler.hashnode.dev4 min read