Pandas version checks

  • [x] 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.

Comment From: rhshadrach

Thanks for the report. While I personally do not think the identified functions require improvement, I wouldn't be strongly opposed to filling out these docstings. However, for internal functions as short as these are, I do not believe we need to take up space on the issue tracker with this. Closing.