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

fix: Respect columns order in Model.examples #132

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gab23r
Copy link

@gab23r gab23r commented Feb 18, 2025

fixes: #18

@gab23r gab23r marked this pull request as draft February 18, 2025 10:04
@gab23r gab23r force-pushed the fix--examples-columns-order branch from 392a677 to 5e7cd69 Compare February 18, 2025 11:03
@@ -863,7 +863,7 @@ def examples(
if column_name not in kwargs:
if column_name in cls.unique_columns:
unique_series.append(
pl.first().cum_count().cast(dtype).alias(column_name)
pl.int_range(pl.len()).cast(dtype).alias(column_name)
Copy link
Author

Choose a reason for hiding this comment

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

I think this is more idiomatic

@gab23r gab23r marked this pull request as ready for review February 18, 2025 11:05
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.

bug: Model.examples returns columns in reverse order when you pass a list
1 participant