-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
fixed doctest in styler.to_latex #42711
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -536,7 +536,18 @@ def to_latex( | |
>>> df = pd.DataFrame([[1,2], [3,4]]) | ||
>>> s = df.style.highlight_max(axis=None, | ||
... props='background-color:red; font-weight:bold;') | ||
>>> s.render() | ||
>>> s.render() #doctest: +ELLIPSIS | ||
'<style type="text/css">\n#..._row1_col1 {\n background-color: red;\n | ||
font-weight: bold;\n}\n</style>\n<table id="...">\n <thead>\n <tr>\n | ||
<th class="blank level0" > </th>\n <th class="col_heading | ||
level0 col0" >0</th>\n <th class="col_heading level0 col1" >1</th>\n | ||
</tr>\n </thead>\n <tbody>\n <tr>\n <th id="..._level0_row0" | ||
class="row_heading level0 row0" >0</th>\n <td id="..._row0_col0" | ||
class="data row0 col0" >1</td>\n <td id="..._row0_col1" class="data | ||
row0 col1" >2</td>\n </tr>\n <tr>\n <th id="..._level0_row1" | ||
class="row_heading level0 row1" >1</th>\n <td id="..._row1_col0" | ||
class="data row1 col0" >3</td>\n <td id="..._row1_col1" | ||
class="data row1 col1" >4</td>\n </tr>\n </tbody>\n</table>\n' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably not very useful to have something so big. Maybe add the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah aha, that 100% makes sense. Will be creating a new pull request since I messed up something in my current repository |
||
|
||
The equivalent using LaTeX only commands is the following: | ||
|
||
|
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.
I think you need to leave two spaces before the
#
and one after.