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(python,rust): include set_fmt_float value in Config load/save state #7696

Merged
merged 1 commit into from
Mar 22, 2023

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Mar 22, 2023

Allow current state of the associated Config.set_fmt_float value to be saved; this also allows it to work properly in context-manager scope.

(Also, declares a TypeAlias for FloatFmt and sorts some of the Config methods).

Example:

with pl.Config() as cfg:
    cfg.set_fmt_float("full")
    print(df)

# float fmt reset to "mixed" (original state) on scope-exit

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars labels Mar 22, 2023
@alexander-beedie alexander-beedie force-pushed the config-float-fmt-context branch 3 times, most recently from 1227643 to c6e025e Compare March 22, 2023 09:46
@alexander-beedie alexander-beedie force-pushed the config-float-fmt-context branch from c6e025e to 26f837d Compare March 22, 2023 10:32
@ritchie46 ritchie46 merged commit 073329f into pola-rs:master Mar 22, 2023
@alexander-beedie alexander-beedie deleted the config-float-fmt-context branch March 22, 2023 19:34
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 python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants