From 9e45194218e72f7af1bf96412e3f337cfba52446 Mon Sep 17 00:00:00 2001 From: Nick Crews Date: Mon, 2 Oct 2023 10:47:06 -0800 Subject: [PATCH] docs: improve cross-linking within reference --- ibis/expr/schema.py | 2 +- ibis/expr/types/generic.py | 4 +++- ibis/expr/types/relations.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ibis/expr/schema.py b/ibis/expr/schema.py index d3b1841d517b..114ffec6a89d 100644 --- a/ibis/expr/schema.py +++ b/ibis/expr/schema.py @@ -17,7 +17,7 @@ class Schema(Concrete, Coercible, MapSet): - """An object for holding table schema information.""" + """An ordered mapping of str -> [datatype](./datatypes.qmd), used to hold a [Table](./expression-tables.qmd#ibis.expr.tables.Table)'s schema.""" fields: FrozenDict[str, dt.DataType] """A mapping of [](`str`) to diff --git a/ibis/expr/types/generic.py b/ibis/expr/types/generic.py index d95d5ba5cd8b..dc4439c460e4 100644 --- a/ibis/expr/types/generic.py +++ b/ibis/expr/types/generic.py @@ -82,6 +82,8 @@ def hash(self) -> ir.IntegerValue: def cast(self, target_type: dt.DataType) -> Value: """Cast expression to indicated data type. + Similar to `pandas.Series.astype`. + Parameters ---------- target_type @@ -877,7 +879,7 @@ def desc(self) -> ir.Value: return ops.SortKey(self, ascending=False).to_expr() def as_table(self) -> ir.Table: - """Promote the expression to a table. + """Promote the expression to a [Table](./expression-tables.qmd#ibis.expr.types.Table). Returns ------- diff --git a/ibis/expr/types/relations.py b/ibis/expr/types/relations.py index 36451f25664d..f0cc2426360f 100644 --- a/ibis/expr/types/relations.py +++ b/ibis/expr/types/relations.py @@ -695,7 +695,7 @@ def columns(self) -> list[str]: return list(self.schema().names) def schema(self) -> sch.Schema: - """Return the schema for this table. + """Return the [Schema](./schemas.qmd#ibis.expr.schema.Schema) for this table. Returns -------