polars.Expr.map.values#

Expr.map.values() → Expr[source]#

Get the values of every map as a List, in entry order.

engine:In MemoryStreamingDistributed
Returns:
Expr

Expression of data type List of the map’s value type.

Examples

>>> df = pl.DataFrame(
...     {
...         "m": pl.Series(
...             [{"a": 1, "b": 2}, {}, None], dtype=pl.Map(pl.String, pl.Int64)
...         )
...     }
... )
>>> df.select(pl.col("m").map.values())
shape: (3, 1)
┌───────────┐
│ m         │
│ ---       │
│ list[i64] │
╞═══════════╡
│ [1, 2]    │
│ []        │
│ null      │
└───────────┘