Pandas where to CASE

where keeps the original when the test is true. mask is the opposite.

CASE WHEN status = 'Shipped' THEN total_amount ELSE 0 END

mask(cond, 0) is CASE WHEN cond THEN 0 ELSE total_amount END.

Canonical translation

CASE WHEN status = 'Shipped' THEN total_amount ELSE 0 END

Then write it on a ticket

Monday is free. A colleague asks, you type, we mark it.

Clock in free