File tree 3 files changed +72
-9
lines changed
3 files changed +72
-9
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
137
137
pandas.errors.PyperclipWindowsException \
138
138
pandas.errors.UnsortedIndexError \
139
139
pandas.errors.UnsupportedFunctionCall \
140
- pandas.show_versions \
141
140
pandas.test \
142
141
pandas.NaT \
143
142
pandas.Timestamp.as_unit \
@@ -170,14 +169,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
170
169
pandas.Period.asfreq \
171
170
pandas.Period.now \
172
171
pandas.arrays.PeriodArray \
173
- pandas.Int8Dtype \
174
- pandas.Int16Dtype \
175
- pandas.Int32Dtype \
176
- pandas.Int64Dtype \
177
- pandas.UInt8Dtype \
178
- pandas.UInt16Dtype \
179
- pandas.UInt32Dtype \
180
- pandas.UInt64Dtype \
181
172
pandas.NA \
182
173
pandas.CategoricalDtype.categories \
183
174
pandas.CategoricalDtype.ordered \
Original file line number Diff line number Diff line change @@ -147,6 +147,56 @@ class IntegerArray(NumericArray):
147
147
Methods
148
148
-------
149
149
None
150
+
151
+ Examples
152
+ --------
153
+ For Int8Dtype:
154
+
155
+ >>> ser = pd.Series([2, pd.NA], dtype=pd.Int8Dtype())
156
+ >>> ser.dtype
157
+ Int8Dtype()
158
+
159
+ For Int16Dtype:
160
+
161
+ >>> ser = pd.Series([2, pd.NA], dtype=pd.Int16Dtype())
162
+ >>> ser.dtype
163
+ Int16Dtype()
164
+
165
+ For Int32Dtype:
166
+
167
+ >>> ser = pd.Series([2, pd.NA], dtype=pd.Int32Dtype())
168
+ >>> ser.dtype
169
+ Int32Dtype()
170
+
171
+ For Int64Dtype:
172
+
173
+ >>> ser = pd.Series([2, pd.NA], dtype=pd.Int64Dtype())
174
+ >>> ser.dtype
175
+ Int64Dtype()
176
+
177
+ For UInt8Dtype:
178
+
179
+ >>> ser = pd.Series([2, pd.NA], dtype=pd.UInt8Dtype())
180
+ >>> ser.dtype
181
+ UInt8Dtype()
182
+
183
+ For UInt16Dtype:
184
+
185
+ >>> ser = pd.Series([2, pd.NA], dtype=pd.UInt16Dtype())
186
+ >>> ser.dtype
187
+ UInt16Dtype()
188
+
189
+ For UInt32Dtype:
190
+
191
+ >>> ser = pd.Series([2, pd.NA], dtype=pd.UInt32Dtype())
192
+ >>> ser.dtype
193
+ UInt32Dtype()
194
+
195
+ For UInt64Dtype:
196
+
197
+ >>> ser = pd.Series([2, pd.NA], dtype=pd.UInt64Dtype())
198
+ >>> ser.dtype
199
+ UInt64Dtype()
150
200
"""
151
201
152
202
# create the Dtype
Original file line number Diff line number Diff line change @@ -114,6 +114,28 @@ def show_versions(as_json: str | bool = False) -> None:
114
114
* If str, it will be considered as a path to a file.
115
115
Info will be written to that file in JSON format.
116
116
* 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
+ ...
117
139
"""
118
140
sys_info = _get_sys_info ()
119
141
deps = _get_dependency_info ()
You can’t perform that action at this time.
0 commit comments