Skip to content

Commit 2ed2b8d

Browse files
committed
DOC: Fix code format of 2 examples added to Series section (pandas-dev#41423).
After building documentation, found the code examples were not displayed correctly. Added newlines and rebuilt to fix.
1 parent 0c70b9f commit 2ed2b8d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/core/series.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ class Series(base.IndexOpsMixin, generic.NDFrame):
256256
get all NaN as a result.
257257
258258
Constructing Series from an array with `copy=False`.
259+
259260
>>> r = [1,2]
260261
>>> ser = pd.Series(r, copy=False)
261262
>>> ser.iloc[0] = 999
@@ -267,9 +268,10 @@ class Series(base.IndexOpsMixin, generic.NDFrame):
267268
dtype: int64
268269
269270
The Series returns a `copy` of the original data, so
270-
`r` is unchanged.
271+
the original data is unchanged.
271272
272273
Constructing Series from a `numpy.array` with `copy=False`.
274+
273275
>>> r = np.array([1,2])
274276
>>> ser = pd.Series(r, copy=False)
275277
>>> ser.iloc[0] = 999
@@ -281,7 +283,7 @@ class Series(base.IndexOpsMixin, generic.NDFrame):
281283
dtype: int32
282284
283285
The Series returns a `view` on the original data, so
284-
`r` is changed as well.
286+
the original data is changed as well.
285287
"""
286288

287289
_typ = "series"

0 commit comments

Comments
 (0)