Skip to content

Commit 8ed347a

Browse files
Moisanjreback
authored andcommitted
DOC: fix DataFrame.replace and DataFrame.set_index (#23939)
1 parent 295703b commit 8ed347a

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

ci/code_checks.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then
147147

148148
MSG='Doctests frame.py' ; echo $MSG
149149
pytest -q --doctest-modules pandas/core/frame.py \
150-
-k"-axes -combine -itertuples -join -pivot_table -quantile -query -reindex -reindex_axis -replace -round -set_index -stack"
150+
-k"-axes -combine -itertuples -join -pivot_table -quantile -query -reindex -reindex_axis -round"
151151
RET=$(($RET + $?)) ; echo $MSG "DONE"
152152

153153
MSG='Doctests series.py' ; echo $MSG

pandas/core/generic.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -6118,7 +6118,7 @@ def bfill(self, axis=None, inplace=False, limit=None, downcast=None):
61186118
value to use for each column (columns not in the dict will not be
61196119
filled). Regular expressions, strings and lists or dicts of such
61206120
objects are also allowed.
6121-
inplace : boolean, default False
6121+
inplace : bool, default False
61226122
If True, in place. Note: this will modify any
61236123
other views on this object (e.g. a column from a DataFrame).
61246124
Returns the caller if this is True.
@@ -6137,12 +6137,6 @@ def bfill(self, axis=None, inplace=False, limit=None, downcast=None):
61376137
.. versionchanged:: 0.23.0
61386138
Added to DataFrame.
61396139
6140-
See Also
6141-
--------
6142-
%(klass)s.fillna : Fill NA values.
6143-
%(klass)s.where : Replace values based on boolean condition.
6144-
Series.str.replace : Simple string replacement.
6145-
61466140
Returns
61476141
-------
61486142
%(klass)s
@@ -6166,6 +6160,12 @@ def bfill(self, axis=None, inplace=False, limit=None, downcast=None):
61666160
* If a ``list`` or an ``ndarray`` is passed to `to_replace` and
61676161
`value` but they are not the same length.
61686162
6163+
See Also
6164+
--------
6165+
%(klass)s.fillna : Fill NA values.
6166+
%(klass)s.where : Replace values based on boolean condition.
6167+
Series.str.replace : Simple string replacement.
6168+
61696169
Notes
61706170
-----
61716171
* Regex substitution is performed under the hood with ``re.sub``. The
@@ -6280,7 +6280,7 @@ def bfill(self, axis=None, inplace=False, limit=None, downcast=None):
62806280
1 foo new
62816281
2 bait xyz
62826282
6283-
>>> df.replace(regex={r'^ba.$':'new', 'foo':'xyz'})
6283+
>>> df.replace(regex={r'^ba.$': 'new', 'foo': 'xyz'})
62846284
A B
62856285
0 new abc
62866286
1 xyz new

0 commit comments

Comments
 (0)