polars.Series.map.entries#
- Series.map.entries() Series[source]#
Convert the
Mapto aListofStructentries.Each entry is a
Structwith akeyand avaluefield. Entry order is preserved. The inverse ofExpr.list.to_map().Examples
>>> s = pl.Series([{"a": 1, "b": 2}], dtype=pl.Map(pl.String, pl.Int64)) >>> s.map.entries() shape: (1,) Series: '' [list[struct[2]]] [ [{"a",1}, {"b",2}] ]