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

feat: dask namespace lit method #772

Merged
merged 1 commit into from
Aug 10, 2024
Merged

Conversation

FBruzzesi
Copy link
Member

What type of PR is this? (check all applicable)

  • πŸ’Ύ Refactor
  • ✨ Feature
  • πŸ› Bug Fix
  • πŸ”§ Optimization
  • πŸ“ Documentation
  • βœ… Test
  • 🐳 Other

Related issues

Checklist

  • Code follows style guide (ruff)
  • Tests added
  • Documented the changes

If you have comments or can explain your changes, please do so below.

@github-actions github-actions bot added the enhancement New feature or request label Aug 10, 2024
# TODO @FBruzzesi: cast to dtype once `reverse_translate_dtype` is implemented.
# It should be enough to add `.astype(reverse_translate_dtype(dtype))`
return DaskExpr(
lambda df: [df._native_dataframe.assign(lit=value).loc[:, "lit"]],
Copy link
Member Author

@FBruzzesi FBruzzesi Aug 10, 2024

Choose a reason for hiding this comment

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

it's hacky yet at the same time a simple way to maintain the original index

Copy link
Member

Choose a reason for hiding this comment

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

works

i'd like to think that dask_expr should be able to optimise this anyway

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

thanks @FBruzzesi !

@MarcoGorelli MarcoGorelli merged commit ce2c022 into main Aug 10, 2024
23 checks passed
@FBruzzesi FBruzzesi deleted the feat/dask-namespace-lit branch August 10, 2024 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants