Skip to content

Commit e51599d

Browse files
committed
doc-string
1 parent 917d749 commit e51599d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pandas/core/series.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3651,6 +3651,13 @@ def explode(self) -> "Series":
36513651
Series.str.split: Split string values on specified separator.
36523652
Series.unstack: Unstack, a.k.a. pivot, Series with MultiIndex to produce DataFrame.
36533653
3654+
Notes
3655+
-----
3656+
This routine will explode list-likes including lists, tuples, Series, and np.ndarray.
3657+
The result dtype of the returned Series will always be object.
3658+
Scalars will be returned unchanged.
3659+
Empty list-likes will result in a np.nan for that row.
3660+
36543661
Examples
36553662
--------
36563663
In [1]: s = pd.Series([[1, 2, 3], 'foo', [], [3, 4]])
@@ -3673,13 +3680,6 @@ def explode(self) -> "Series":
36733680
3 3
36743681
3 4
36753682
dtype: object
3676-
3677-
Notes
3678-
-----
3679-
This routine will explode list-likes including lists, tuples, Series, and np.ndarray.
3680-
The result dtype of the returned Series will always be object.
3681-
Scalars will be returned unchanged.
3682-
Empty list-likes will result in a np.nan for that row.
36833683
"""
36843684
if not len(self) or not is_object_dtype(self):
36853685
return self.copy()

0 commit comments

Comments
 (0)