Skip to content

Commit da640ed

Browse files
add examples + suppress see also error
1 parent c3403b7 commit da640ed

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

ci/code_checks.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7979
-i "pandas.api.typing.DataFrameGroupBy.plot PR02" \
8080
-i "pandas.api.typing.SeriesGroupBy.plot PR02" \
8181
-i "pandas.api.typing.Resampler.quantile PR01,PR07" \
82+
-i "pandas.StringDtype.storage SA01" \
83+
-i "pandas.StringDtype.na_value SA01" \
8284
-i "pandas.tseries.offsets.BDay PR02,SA01" \
8385
-i "pandas.tseries.offsets.BHalfYearBegin.is_on_offset GL08" \
8486
-i "pandas.tseries.offsets.BHalfYearBegin.n GL08" \

pandas/core/arrays/string_.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,14 @@ def na_value(self) -> libmissing.NAType | float: # type: ignore[override]
156156
This value indicates which missing value semantics are used by this dtype.
157157
Returns ``np.nan`` for the default string dtype with NumPy semantics,
158158
and ``pd.NA`` for the opt-in string dtype with pandas NA semantics.
159+
160+
Examples
161+
--------
162+
>>> ser = pd.Series(["a", "b"])
163+
>>> ser.dtype
164+
<StringDtype(na_value=nan)>
165+
>>> ser.dtype.na_value
166+
nan
159167
"""
160168
return self._na_value
161169

@@ -165,6 +173,14 @@ def storage(self) -> str:
165173
The storage backend for this dtype.
166174
167175
Can be either "pyarrow" or "python".
176+
177+
Examples
178+
--------
179+
>>> ser = pd.Series(["a", "b"])
180+
>>> ser.dtype
181+
<StringDtype(na_value=nan)>
182+
>>> ser.dtype.storage
183+
'pyarrow'
168184
"""
169185
return self._storage
170186

0 commit comments

Comments
 (0)