Skip to content

Commit ee5b6ba

Browse files
committed
doc-string
1 parent 3b97cef commit ee5b6ba

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
@@ -3653,6 +3653,13 @@ def explode(self) -> "Series":
36533653
Series.str.split: Split string values on specified separator.
36543654
Series.unstack: Unstack, a.k.a. pivot, Series with MultiIndex to produce DataFrame.
36553655
3656+
Notes
3657+
-----
3658+
This routine will explode list-likes including lists, tuples, Series, and np.ndarray.
3659+
The result dtype of the returned Series will always be object.
3660+
Scalars will be returned unchanged.
3661+
Empty list-likes will result in a np.nan for that row.
3662+
36563663
Examples
36573664
--------
36583665
In [1]: s = pd.Series([[1, 2, 3], 'foo', [], [3, 4]])
@@ -3675,13 +3682,6 @@ def explode(self) -> "Series":
36753682
3 3
36763683
3 4
36773684
dtype: object
3678-
3679-
Notes
3680-
-----
3681-
This routine will explode list-likes including lists, tuples, Series, and np.ndarray.
3682-
The result dtype of the returned Series will always be object.
3683-
Scalars will be returned unchanged.
3684-
Empty list-likes will result in a np.nan for that row.
36853685
"""
36863686
if not len(self) or not is_object_dtype(self):
36873687
return self.copy()

0 commit comments

Comments
 (0)