-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
ENH: Styler css Str optional input arguments as well as List[Tuple] #39564
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
Conversation
attack68
commented
Feb 2, 2021
•
edited
Loading
edited
- closes ENH: Styler accepts css-strings input args as well as list of (attr,value) pairs #39563
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
this is ready for review.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks fine. couple of comments.
pandas/io/formats/style.py
Outdated
|
||
def _maybe_convert_css_to_tuples( | ||
style: Union[str, Sequence[Tuple[str, Union[str, int, float]]]] | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add an output type (maybe define this at the top as CSSProperties or similar)
doc/source/whatsnew/v1.3.0.rst
Outdated
@@ -56,6 +56,7 @@ Other enhancements | |||
- :meth:`.Styler.set_tooltips` allows on hover tooltips to be added to styled HTML dataframes. | |||
- :meth:`Series.loc.__getitem__` and :meth:`Series.loc.__setitem__` with :class:`MultiIndex` now raising helpful error message when indexer has too many dimensions (:issue:`35349`) | |||
- :meth:`pandas.read_stata` and :class:`StataReader` support reading data from compressed files. | |||
- :meth:`.Styler.set_tooltips_class` and :meth:`.Styler.set_table_styles` amended to optionally allow certain css-string input arguments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
locate after the other note, L56 (which is missing an issue number; use the PR number for it)
@jreback changes made, with some better typing throughout the module. one failed test is unrelated. |
thanks @attack68 keep em coming! |