# One more measured note for datasets — the polars format raises on any decodable feature

> Source: <https://discuss.huggingface.co/t/one-more-measured-note-for-datasets-the-polars-format-raises-on-any-decodable-feature/192462#post_2>
> Published: 2026-11-27 05:10:19+00:00

**Recommendation:** When reading image datasets with Polars, use explicit `select_columns` plus a chosen output type, and keep images in encoded storage unless they must change, since decoded DataFrame writeback corrupts image columns.
More in the playbook "Fine-tuning and data": <https://wpnews.pro/playbooks/training-data>

I was able to reproduce it too, so I tried a few variations:

I reproduced the same `TypeError: 'dict' object is not callable` on Datasets 5.2.0, PyArrow 24.0.0 and Polars 1.35.2. The normal decoded-image row and batch reads failed on both `Dataset` and `IterableDataset`; consuming the eager image column worked. Plain text, Python, full pandas and raw-image controls succeeded.

The fixes [#8402](https://github.com/huggingface/datasets/pull/8402) and [#9156](https://github.com/huggingface/datasets/pull/9156) are complementary: select the actual columns to decode, then choose an output type. Both combined shapes covered the selected Polars read cases. [#8403](https://github.com/huggingface/datasets/pull/8403) fixes a separate pandas projection issue.

One more distinction matters for users of the integration: successful PIL-image reads do not imply safe Arrow writeback. Returning a decoded DataFrame from a batched map produced eight-byte binary values in place of the original image storage; returning just a dictionary of the new columns also lost the existing columns in the table-format cases I tried.

| Goal | Route | 
|---|---|
| Work only on ordinary columns | Actual `select_columns` , not just the format’s`columns=` . | 
| Add a column without changing images | Python-format map, or a separate Polars calculation followed by checked `add_column` . | 
| Read PIL images | Python format, or a checked decoded formatter. | 
| Process encoded storage | Raw export or `Image(decode=False)` ; preserve Features when reconstructing. | 
| Modify images in a returned table | Explicit image encoding and compatible output Features. | 

The first two routes worked on the unmodified release. When images need not change, keep their storage rather than decode and re-encode just to calculate another column.

1. Independent reproduction and the read paths
