Skip to content

Commit

Permalink
[DOCS] Remove unsupported map get doc example (#2452)
Browse files Browse the repository at this point in the history
I realized I forgot to remove this when we decided that
`Expression.map.get` should not support syntactic sugar
  • Loading branch information
kevinzwang committed Jun 29, 2024
1 parent 29b02a1 commit de1a9a0
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions daft/expressions/expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1825,26 +1825,6 @@ def get(self, key: Expression) -> Expression:
│ }] ┆ │
╰───────────┴───────╯
(Showing first 3 of 3 rows)
>>>
>>> # you may also use the "column.key" syntax to get map values
>>> df2 = df.with_column("b", df["map_col.b"])
>>> df2.show()
╭───────────┬───────╮
│ map_col ┆ b │
│ --- ┆ --- │
│ Map[Utf8] ┆ Int64 │
╞═══════════╪═══════╡
│ [{key: a, ┆ None │
│ value: 1, ┆ │
│ }] ┆ │
├╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┤
│ [] ┆ None │
├╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┤
│ [{key: b, ┆ 2 │
│ value: 2, ┆ │
│ }] ┆ │
╰───────────┴───────╯
(Showing first 3 of 3 rows)
Args:
key: the key to retrieve
Expand Down

0 comments on commit de1a9a0

Please sign in to comment.