Skip to content
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

DOC: discrepancy between pandas.set_option docstring and supported API #57148

Closed
1 task done
jrmylow opened this issue Jan 30, 2024 · 2 comments · Fixed by #57235
Closed
1 task done

DOC: discrepancy between pandas.set_option docstring and supported API #57148

jrmylow opened this issue Jan 30, 2024 · 2 comments · Fixed by #57235
Assignees
Labels

Comments

@jrmylow
Copy link
Contributor

jrmylow commented Jan 30, 2024

Pandas version checks

  • I have checked that the issue still exists on the latest versions of the docs on main here

Location of the documentation

pandas.set_option

Documentation problem

Encountered when fixing up PR02 errors in #57111

The documented arguments for pandas.set_option are (pat, value) per the docstring:

_set_option_tmpl = """

The actual function arguments of the underlying _set_option function are (*args, **kwargs) because it accepts pairs of patterns to update values to.

def _set_option(*args, **kwargs) -> None:

Suggested fix for documentation

Either:

  1. The docstring and documentation should be updated to note that it accepts args and kwargs; or
  2. The implementation should be updated to match the documentation, at the risk of breaking anything that relies on undocumented behaviour
@jrmylow jrmylow added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels Jan 30, 2024
@rhshadrach
Copy link
Member

I'd be against changing the implementation. Updating the docstring sounds good!

@rhshadrach rhshadrach removed the Needs Triage Issue that has not been reviewed by a pandas team member label Feb 1, 2024
@jrmylow
Copy link
Contributor Author

jrmylow commented Feb 2, 2024

Take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants