Pandas version checks
- [x] I have checked that the issue still exists on the latest versions of the docs on
mainhere
Location of the documentation
pandas/core/common.py (lines 176–210)
Documentation problem
Several internal utility functionshave unclear or missing docstrings.
not_nonereturns a generator, unlike others nearby which return booleans (not documented).- Functions like
any_not_none,all_none, andany_nonelack parameter descriptions, return types any_not_noneduplicates the logic ofany_nonebut 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_noneto 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_noneandany_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.