Start with four pinned rows of clicks and impressions. Keep both original count columns unchanged.
Create click_rate only when the denominator is safe. The rate is shown as an exact fraction, so 2 / 10 and 4 / 20 both become 1/5 without floating rounding.
Adding an exact rate feature from pinned counts while guarding against division by zero.
highlighted = computed this step
Input counts
Start with 4 pinned rows of click and impression counts.
clicks and impressions
Safe division rule
Divide only when impressions is greater than 0; otherwise leave the rate undefined.
safe rate rule
Add click_rate
Keep the counts unchanged and add the exact click_rate feature.