polars.Series.map.get#
- Series.map.get(key: IntoExpr) Series[source]#
Look up
keyin every map.Maps that do not hold
keyyield null, as do null maps. Usecontains_key()to tell a missing key apart from a key whose value is null.- Parameters:
- key
Key to look up. A single value is broadcast over all maps.
- Returns:
- Series
Series of the map’s value type.
Examples
>>> s = pl.Series( ... [{"a": 1, "b": 2}, {}, None], dtype=pl.Map(pl.String, pl.Int64) ... ) >>> s.map.get("a") shape: (3,) Series: '' [i64] [ 1 null null ]