Skip to content

Commit f513fb0

Browse files
committed
fixed a docstring template
1 parent da3a0d9 commit f513fb0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/core/generic.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6424,16 +6424,16 @@ def replace(
64246424
This raises a ``TypeError`` because one of the ``dict`` keys is not of
64256425
the correct type for replacement.
64266426
6427-
Compare the behavior of ``s.replace({'a': None})`` and
6427+
Compare the behavior of ``s.replace({{'a': None}})`` and
64286428
``s.replace('a', None)`` to understand the peculiarities
64296429
of the `to_replace` parameter:
64306430
64316431
>>> s = pd.Series([10, 'a', 'a', 'b', 'a'])
64326432
64336433
When one uses a dict as the `to_replace` value, it is like the
64346434
value(s) in the dict are equal to the `value` parameter.
6435-
``s.replace({'a': None})`` is equivalent to
6436-
``s.replace(to_replace={'a': None}, value=None, method=None)``:
6435+
``s.replace({{'a': None}})`` is equivalent to
6436+
``s.replace(to_replace={{'a': None}}, value=None, method=None)``:
64376437
64386438
>>> s.replace({{'a': None}})
64396439
0 10

0 commit comments

Comments
 (0)