79809521

Date: 2025-11-05 00:47:44
Score: 1.5
Natty:
Report link

I found the answer -

test = test.with_columns(
    pl.when(pl.col(pl.Float32) > 8)
      .then(0)
      .otherwise(pl.col(pl.Float32)).name.keep()
)

I needed otherwise and to explicitly keep the column names. I thought the expression expansion was the issue but this works.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: thefrollickingnerd