-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: Fix doctest in EngFormatter #42671
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
Labels
Milestone
Comments
take |
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 25, 2021
4 tasks
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 25, 2021
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 25, 2021
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 25, 2021
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 25, 2021
KrishnaSai2020
pushed a commit
to KrishnaSai2020/pandas
that referenced
this issue
Jul 25, 2021
@hrishikeshnikam2000 I'm sorry I have already made the fix for this issue just waiting for the pr to get merged. Please see #42705 |
@KrishnaSai2020 sorry about that. I saw that later and that's why I was deleted my comment. But I was still assigned to this issue. |
Ah I see, sorry for that! |
jreback
pushed a commit
that referenced
this issue
Jul 30, 2021
Leonardofreua
pushed a commit
to Leonardofreua/pandas
that referenced
this issue
Jul 30, 2021
attack68
added a commit
that referenced
this issue
Jul 31, 2021
* TST: Fix doctests for pandas.io.formats.style * Modified: pandas/io/formats/style.py * Added some expected results * Skipped some tests * TST: Add link to redirect to Table Visualization user guide * Modified style.py * Updated the doctest of the apply() * Updated the doctest of the applymap() * Updated the doctest of the set_table_styles() * Updated the doctest of the set_properties() * TST: Add image to pipe function result * Modified style.py * Updated the doctest of the pipe() * TST: Remove unnecessary outputs * Modified pandas/io/formats/style.py * Updated the doctests of the set_tooltips() * Updated the doctests of the to_latex() * Updated the doctests of the set_td_classes() * Updated the doctests of the set_table_attributes() * TST: Add the output to the Styler.format doctest in to_latex() * REG: DataFrame.agg where func returns lists and axis=1 (#42762) * Fix typing issues for CI (#42770) * BUG: groupby.shift returns different columns when fill_value is specified (#41858) * PERF: extract_array earlier in DataFrame construction (#42774) * ENH: `sparse_columns` and `sparse_index` added to `Styler.to_html` (#41946) * TYP: Fix typing for searchsorted (#42788) * DOC GH42756 Update documentation for pandas.DataFrame.drop to clarify tuples. (#42789) * CI: Fix doctests (#42790) * REGR: nanosecond timestamp comparisons to OOB datetimes (#42796) * COMPAT: MPL 3.4.0 (#42803) * Delete duplicates and unused code from reshape tests (#42802) * REGR: ValueError raised when both prefix and names are set to None (#42690) * REGR: ValueError raised when both prefix and names are set to None * Update readers.py * whitespace * Update v1.3.1.rst * Update v1.3.2.rst * Update readers.py * Update readers.py Co-authored-by: Jeff Reback <[email protected]> * TST: Add style.py to the doctest check * TST: fixed eng_formatter doctest for #42671 (#42705) * TST: Revert x and y position in some doctests * Updated the doctest of the hide_columns() Co-authored-by: Richard Shadrach <[email protected]> Co-authored-by: Irv Lustig <[email protected]> Co-authored-by: Thomas Smith <[email protected]> Co-authored-by: jbrockmendel <[email protected]> Co-authored-by: attack68 <[email protected]> Co-authored-by: Mike Phung <[email protected]> Co-authored-by: Matthew Zeitlin <[email protected]> Co-authored-by: Thomas Li <[email protected]> Co-authored-by: Patrick Hoefler <[email protected]> Co-authored-by: Jeff Reback <[email protected]> Co-authored-by: Krishna Chivukula <[email protected]>
feefladder
pushed a commit
to feefladder/pandas
that referenced
this issue
Sep 7, 2021
feefladder
pushed a commit
to feefladder/pandas
that referenced
this issue
Sep 7, 2021
* TST: Fix doctests for pandas.io.formats.style * Modified: pandas/io/formats/style.py * Added some expected results * Skipped some tests * TST: Add link to redirect to Table Visualization user guide * Modified style.py * Updated the doctest of the apply() * Updated the doctest of the applymap() * Updated the doctest of the set_table_styles() * Updated the doctest of the set_properties() * TST: Add image to pipe function result * Modified style.py * Updated the doctest of the pipe() * TST: Remove unnecessary outputs * Modified pandas/io/formats/style.py * Updated the doctests of the set_tooltips() * Updated the doctests of the to_latex() * Updated the doctests of the set_td_classes() * Updated the doctests of the set_table_attributes() * TST: Add the output to the Styler.format doctest in to_latex() * REG: DataFrame.agg where func returns lists and axis=1 (pandas-dev#42762) * Fix typing issues for CI (pandas-dev#42770) * BUG: groupby.shift returns different columns when fill_value is specified (pandas-dev#41858) * PERF: extract_array earlier in DataFrame construction (pandas-dev#42774) * ENH: `sparse_columns` and `sparse_index` added to `Styler.to_html` (pandas-dev#41946) * TYP: Fix typing for searchsorted (pandas-dev#42788) * DOC GH42756 Update documentation for pandas.DataFrame.drop to clarify tuples. (pandas-dev#42789) * CI: Fix doctests (pandas-dev#42790) * REGR: nanosecond timestamp comparisons to OOB datetimes (pandas-dev#42796) * COMPAT: MPL 3.4.0 (pandas-dev#42803) * Delete duplicates and unused code from reshape tests (pandas-dev#42802) * REGR: ValueError raised when both prefix and names are set to None (pandas-dev#42690) * REGR: ValueError raised when both prefix and names are set to None * Update readers.py * whitespace * Update v1.3.1.rst * Update v1.3.2.rst * Update readers.py * Update readers.py Co-authored-by: Jeff Reback <[email protected]> * TST: Add style.py to the doctest check * TST: fixed eng_formatter doctest for pandas-dev#42671 (pandas-dev#42705) * TST: Revert x and y position in some doctests * Updated the doctest of the hide_columns() Co-authored-by: Richard Shadrach <[email protected]> Co-authored-by: Irv Lustig <[email protected]> Co-authored-by: Thomas Smith <[email protected]> Co-authored-by: jbrockmendel <[email protected]> Co-authored-by: attack68 <[email protected]> Co-authored-by: Mike Phung <[email protected]> Co-authored-by: Matthew Zeitlin <[email protected]> Co-authored-by: Thomas Li <[email protected]> Co-authored-by: Patrick Hoefler <[email protected]> Co-authored-by: Jeff Reback <[email protected]> Co-authored-by: Krishna Chivukula <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
tl;dr
Fix the next doctest error:
Detailed instructions
Python allows to have example code in the documentation, like in:
In pandas, we use this to document most elements. And there are tools, like pytest,
that can run the examples, and make sure everything is correct.
For historical reasons, we have many examples where the code fails to run, or the
actual output is different from the expected output. For example, check the next
incorrect examples:
All them will fail for different reasons. To test the docstring of an object,
the next command can be run:
Where
pandas/core/frame.py
is the file where the docstring is defined, andpandas.core.frame.DataFrame.info
is the object. A whole file can also be testedby removing the
::
and the object from the command above.In general, the errors in the examples can be fixed with things like:
df
is used, butno sample dataset
df
has been first defined)For example, a function that connects to a private webservice. In
such cases, we can add
# doctest: +SKIP
at the end of the linesthat should not run
To be able to properly fix an example for the first time, the next steps
are needed:
simplified instructions in this page,
and more detailed information in pandas official contributing page.
and make sure the examples are still broken in the
master
branch ofpandas
fix is working as expected
follow PEP-8, and fix the style if it doesn't
request. Make sure you edit the line
Closes #XXXX
with the issuenumber you are addressing, so the issue is automatically closed,
when the pull request is merged
in green. If it doesn't, check if the problem is in your changes
(sometimes things break in master for technical problems, and in
that case you just need to wait for a core developer to fix the
problem)
commit, and push to your branch, no need to open new pull requests)
The text was updated successfully, but these errors were encountered: