Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add missing import to RowNumber example #8523

Conversation

peter-gy
Copy link
Contributor

@peter-gy peter-gy commented Mar 2, 2024

Description of changes

The existing example was not self-contained. Upon execution, it raised an error as dt.int64 could not be resolved.

>>> import ibis
>>> t = ibis.table([("values", dt.int64)])  # NameError: name 'dt' is not defined
>>> w = ibis.window(order_by=t.values)
>>> row_num = ibis.row_number().over(w)
>>> result = t[t.values, row_num.name("row_num")]

This PR adds the missing import ibis.expr.datatypes as dt statement.

Copy link
Member

@lostmygithubaccount lostmygithubaccount left a comment

Choose a reason for hiding this comment

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

thanks!

@lostmygithubaccount lostmygithubaccount merged commit ba21ec0 into ibis-project:main Mar 2, 2024
74 checks passed
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