Skip to content

Commit

Permalink
docs(name): improve docstring of Value.name API
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Dec 17, 2023
1 parent 5b0f987 commit dd66af2
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions ibis/expr/types/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,26 @@ def name(self, name):
Examples
--------
>>> import ibis
>>> t = ibis.table(dict(a="int64"), name="t")
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"a": [1, 2]}, name="t")
>>> t.a
┏━━━━━━━┓
┃ a ┃
┡━━━━━━━┩
│ int64 │
├───────┤
│ 1 │
│ 2 │
└───────┘
>>> t.a.name("b")
r0 := UnboundTable: t
a int64
b: r0.a
┏━━━━━━━┓
┃ b ┃
┡━━━━━━━┩
│ int64 │
├───────┤
│ 1 │
│ 2 │
└───────┘
"""
# TODO(kszucs): shouldn't do simplification here, but rather later
# when simplifying the whole operation tree
Expand Down

0 comments on commit dd66af2

Please sign in to comment.