Skip to content

DOC: Improve docstrings in utility functions in pandas/core/common.py (lines 176–210) #61986

@eduardocamacho10

Description

@eduardocamacho10

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/core/common.py (lines 176–210)

Documentation problem

Several internal utility functionshave unclear or missing docstrings.

  • not_none returns a generator, unlike others nearby which return booleans (not documented).
  • Functions like any_not_none, all_none, and any_none lack parameter descriptions, return types
  • any_not_none duplicates the logic of any_none but does not explain the inversion

Suggested fix for documentation

To imrpove the docstrings for the following utility functions in pandas/core/common.py:

  • Add return type clarification to not_none to explain that it returns a generator, unlike others in the section.
  • For any_not_none, all_none, and similar functions, add full docstring structure with:
    • Parameters section
    • Returns section np
  • Optional: refactor duplicated logic between any_not_none and any_none.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions