Skip to content

Commit 97aa272

Browse files
committed
Added show_versions example
1 parent 29f9499 commit 97aa272

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
137137
pandas.errors.PyperclipWindowsException \
138138
pandas.errors.UnsortedIndexError \
139139
pandas.errors.UnsupportedFunctionCall \
140-
pandas.show_versions \
141140
pandas.test \
142141
pandas.NaT \
143142
pandas.Timestamp.as_unit \

pandas/util/_print_versions.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,28 @@ def show_versions(as_json: str | bool = False) -> None:
114114
* If str, it will be considered as a path to a file.
115115
Info will be written to that file in JSON format.
116116
* If True, outputs info in JSON format to the console.
117+
118+
Examples
119+
--------
120+
>>> pd.show_versions() # doctest: +SKIP
121+
Your output may look something like this:
122+
INSTALLED VERSIONS
123+
------------------
124+
commit : 37ea63d540fd27274cad6585082c91b1283f963d
125+
python : 3.10.6.final.0
126+
python-bits : 64
127+
OS : Linux
128+
OS-release : 5.10.102.1-microsoft-standard-WSL2
129+
Version : #1 SMP Wed Mar 2 00:30:59 UTC 2022
130+
machine : x86_64
131+
processor : x86_64
132+
byteorder : little
133+
LC_ALL : None
134+
LANG : en_GB.UTF-8
135+
LOCALE : en_GB.UTF-8
136+
pandas : 2.0.1
137+
numpy : 1.24.3
138+
...
117139
"""
118140
sys_info = _get_sys_info()
119141
deps = _get_dependency_info()

0 commit comments

Comments
 (0)