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

Allow for literal creation using datatype as constructor #19434

Open
mcrumiller opened this issue Oct 24, 2024 · 0 comments
Open

Allow for literal creation using datatype as constructor #19434

mcrumiller opened this issue Oct 24, 2024 · 0 comments
Labels
enhancement New feature or an improvement of an existing feature

Comments

@mcrumiller
Copy link
Contributor

mcrumiller commented Oct 24, 2024

Description

It would be a nice ergonomic improvement to allow for construction of literals using the data type directly. An example:

pl.select(pl.lit(8, dtype=pl.UInt32))  # existing usage
pl.select(pl.UInt32(8))                # proposed usage

I haven't thought this through for all datatypes but at least for basic integer/string/date types it would be a nice improvement.

@mcrumiller mcrumiller added the enhancement New feature or an improvement of an existing feature label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant