Polars' Categorical Encoding Hides a Global Mutable Dictionary in Plain Sight
The categorical dtype is a thin wrapper over a global, lock-free string-to-u32 dictionary. The trick turns group-by and joins into integer work; the same shared state leaks across …