Skip to content

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

Closed
@jrmylow

Description

@jrmylow

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions