79736501

Date: 2025-08-15 14:15:56
Score: 1.5
Natty:
Report link

When typing with polars.datatypes.Array you should explicitly set array length:

# For arrays of 3 int8 elements:
correct_dtype = pl.Array(pl.Int8, 3)  # ✅ pl.Array(dtype, size)

df.with_columns(pl.col("values").map_batches(udf, return_dtype=correct_dtype))

If length is unknown you could use polars.datatypes.List

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): When
  • Low reputation (1):
Posted by: Герман Просянников