Skip to content

Commit caa574f

Browse files
committed
typos
1 parent d497576 commit caa574f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

doc/source/user_guide/reshaping.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -831,10 +831,10 @@ You can join this with the original to get an expanded ``DataFrame``.
831831
df[['keys']]join(df['values'].explode())
832832
833833
834-
This routine will preserve replace empty lists with ``np.nan`` and preserve scalar entries. The dtype of the resulting ``Series`` is always ``object``.
834+
This routine will replace empty lists with ``np.nan`` and preserve scalar entries. The dtype of the resulting ``Series`` is always ``object``.
835835

836836
.. ipython:: python
837837
838-
s = pd.Series([[1, 2, 3], np.nan, [], ['a', 'b']])
838+
s = pd.Series([[1, 2, 3], 'foo', [], ['a', 'b']])
839839
s
840840
s.explode()

pandas/core/series.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3652,12 +3652,12 @@ def explode(self) -> 'Series':
36523652
36533653
Examples
36543654
--------
3655-
In [1]: s = pd.Series([[1, 2, 3], np.nan, [], [3, 4]])
3655+
In [1]: s = pd.Series([[1, 2, 3], 'foo', [], [3, 4]])
36563656
36573657
In [2]: s
36583658
Out[2]:
36593659
0 [1, 2, 3]
3660-
1 NaN
3660+
1 foo
36613661
2 []
36623662
3 [3, 4]
36633663
dtype: object
@@ -3667,7 +3667,7 @@ def explode(self) -> 'Series':
36673667
0 1
36683668
0 2
36693669
0 3
3670-
1 NaN
3670+
1 foo
36713671
2 NaN
36723672
3 3
36733673
3 4

0 commit comments

Comments
 (0)