79565383

Date: 2025-04-09 21:53:52
Score: 1.5
Natty:
Report link

Using map_batches instead of map_elements runs pretty fast for my > 4 million rows

df = df.with_columns(pl.col("b").map_batches(lambda x: x.to_numpy().transpose(0, 2, 1)))
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: DJDuque