Skip to content

Commit 3ea8389

Browse files
authored
DOC Fix EX01 errors - added example (#51288)
* DOC Fix EX01 errors - added example * DOC Fix EX01 issue
1 parent 7986bc2 commit 3ea8389

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
8787
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX01 --ignore_functions \
8888
pandas.Series.index \
8989
pandas.Series.dtype \
90-
pandas.Series.shape \
9190
pandas.Series.nbytes \
9291
pandas.Series.ndim \
9392
pandas.Series.size \

pandas/core/base.py

+6
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,12 @@ def transpose(self: _T, *args, **kwargs) -> _T:
309309
def shape(self) -> Shape:
310310
"""
311311
Return a tuple of the shape of the underlying data.
312+
313+
Examples
314+
--------
315+
>>> s = pd.Series([1, 2, 3])
316+
>>> s.shape
317+
(3,)
312318
"""
313319
return self._values.shape
314320

0 commit comments

Comments
 (0)