Skip to content

REF: Remove side effects from importing Styler 2 #53429

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

Closed
wants to merge 6 commits into from

Conversation

attack68
Copy link
Contributor

@attack68 attack68 commented May 28, 2023

draft

Alongside this PR I would also recommend:

  • deprecating Styler.from_custom_template since it will be more featureful to create a class directly with specified new templates, and basically just as easy. Docs could be updated.

@@ -1840,7 +1874,10 @@ def _maybe_wrap_formatter(

# Replace chars if escaping
if escape is not None:
func_1 = lambda x: func_0(_str_escape(x, escape=escape))
markupsafe = import_optional_dependency(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this might be quite an expensive import operation if the formatter is applied over each cell. Will have to check this

@mroeschke mroeschke added the Styler conditional formatting using DataFrame.style label May 30, 2023
@attack68
Copy link
Contributor Author

@rhshadrach I created this versus your original PR, to remove some of the floating class attribute caches.

One or two things to clean up test wise but I think it preserves almost all functionality whilst achieving the import side effects changes.

@rhshadrach
Copy link
Member

Sounds good!

@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2023

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Aug 5, 2023
@mroeschke
Copy link
Member

Are you still working on this @attack68?

@attack68
Copy link
Contributor Author

I looked at this yesterday coincidentally actually. Last I checked this works locally but I couldnt get the tests to pass online because they read a file and I guess there is something wrong with the paths. This was quite a good PR though just havent had time to push it over the edge.

@mroeschke
Copy link
Member

Closing to clear the queue, but when you have time to come back to this feel free to reopen the PR

@mroeschke mroeschke closed this Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Styler conditional formatting using DataFrame.style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants