I'm "translating" a series of operations that were in Tableau into a pyspark script. One column in specific I'm having serious trouble to replicate, here the Tableu version of the code:
min(
min(
IF[COLUMN_A] > 0 THEN [COLUMN_B] ELSE 9999 END,
IF[COLUMN_C] > 0 THEN [COLUMN_D] ELSE 99999 END),
min(
IF[COLUMN_E] > 0 THEN [COLUMN_F] ELSE 99999 END,
IF[COLUMN_G] != 0 THEN [COLUMN_H] ELSE 99999 END)
)
Is it possible to create a version of that code using a when and otherwise functions in pyspark? I'm trying but it seems I can't solve this...