-
-
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
Conversation
willie3838
commented
Jul 25, 2021
- [] closes TST: Fix doctest in Styler.to_latex #42672
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
Hello @willie3838! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2021-07-25 16:19:49 UTC |
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.
CC: @attack68
@@ -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 |
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.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not very useful to have something so big. Maybe add the <style type="text/css">...</style><table ...</table>
or something like this helps understand what this is returning in a more concise way?
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.
Yeah aha, that 100% makes sense. Will be creating a new pull request since I messed up something in my current repository
the reason I suggested this as skip doc test is because this is the docstring for |
Thanks @attack68, I missed this was the issue you made the comment to. Happy with that too. Using ellipsis also seems as a reasonable approach to me, also fine, whatever you prefer @willie3838 I think. |