polars.Series.map.contains_key#
- Series.map.contains_key(key: IntoExpr) Series[source]#
Check whether every map holds
key.- Parameters:
- key
Key to look up. A single value is broadcast over all maps.
- Returns:
- Series
Series of data type
Boolean.
Examples
>>> s = pl.Series( ... [{"a": 1, "b": 2}, {}, None], dtype=pl.Map(pl.String, pl.Int64) ... ) >>> s.map.contains_key("a") shape: (3,) Series: '' [bool] [ true false null ]