Skip to content

Commit 4f72d45

Browse files
committed
fixed a docstring template
1 parent 9b48962 commit 4f72d45

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
@@ -6431,16 +6431,16 @@ def replace(
64316431
This raises a ``TypeError`` because one of the ``dict`` keys is not of
64326432
the correct type for replacement.
64336433
6434-
Compare the behavior of ``s.replace({'a': None})`` and
6434+
Compare the behavior of ``s.replace({{'a': None}})`` and
64356435
``s.replace('a', None)`` to understand the peculiarities
64366436
of the `to_replace` parameter:
64376437
64386438
>>> s = pd.Series([10, 'a', 'a', 'b', 'a'])
64396439
64406440
When one uses a dict as the `to_replace` value, it is like the
64416441
value(s) in the dict are equal to the `value` parameter.
6442-
``s.replace({'a': None})`` is equivalent to
6443-
``s.replace(to_replace={'a': None}, value=None, method=None)``:
6442+
``s.replace({{'a': None}})`` is equivalent to
6443+
``s.replace(to_replace={{'a': None}}, value=None, method=None)``:
64446444
64456445
>>> s.replace({{'a': None}})
64466446
0 10

0 commit comments

Comments
 (0)