Skip to content

Commit f148cb7

Browse files
authored
DOC: Added docstring for show_versions() (#33073)
1 parent 98a2aa3 commit f148cb7

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

doc/source/reference/general_utility_functions.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,11 @@ Scalar introspection
108108
api.types.is_re
109109
api.types.is_re_compilable
110110
api.types.is_scalar
111+
112+
Bug report function
113+
-------------------
114+
.. autosummary::
115+
:toctree: api/
116+
117+
show_versions
118+

pandas/util/_print_versions.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,20 @@ def _get_dependency_info() -> Dict[str, JSONSerializable]:
8888

8989

9090
def show_versions(as_json: Union[str, bool] = False) -> None:
91+
"""
92+
Provide useful information, important for bug reports.
93+
94+
It comprises info about hosting operation system, pandas version,
95+
and versions of other installed relative packages.
96+
97+
Parameters
98+
----------
99+
as_json : str or bool, default False
100+
* If False, outputs info in a human readable form to the console.
101+
* If str, it will be considered as a path to a file.
102+
Info will be written to that file in JSON format.
103+
* If True, outputs info in JSON format to the console.
104+
"""
91105
sys_info = _get_sys_info()
92106
deps = _get_dependency_info()
93107

0 commit comments

Comments
 (0)