Skip to content

Conversation

NickCrews
Copy link
Contributor

I tried to make these more beginner friendly. "Scalar subquery" is very overwhelming for someone coming from pandas, and I think should be treated as an implementation detail.

I tried to add more examples, to actually show WHY you would want to use this.


def as_scalar(self) -> ir.Scalar:
"""Inform ibis that the table expression should be treated as a scalar.
"""Inform ibis to treat this table as a 1 row, 1 column scalar.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"""Inform ibis to treat this table as a 1 row, 1 column scalar.
"""Tell ibis to treat this value as 1 row, 1 column table, referred to as a *scalar*.

def as_scalar(self):
"""Inform ibis that the expression should be treated as a scalar.
def as_scalar(self) -> Scalar:
"""Inform ibis to treat this scalar expression as a free-standing scalar.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"""Inform ibis to treat this scalar expression as a free-standing scalar.
"""Tell ibis to treat this expression as a single scalar value.


def as_scalar(self) -> ir.Scalar:
"""Convert an expression to a scalar."""
"""Inform ibis to treat the Scalar, Column, or Table as a scalar.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"""Inform ibis to treat the Scalar, Column, or Table as a scalar.
"""Tell ibis to treat the expression as a scalar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants