Skip to content

Commit

Permalink
change according to comments
Browse files Browse the repository at this point in the history
  • Loading branch information
topper-123 committed Oct 2, 2019
1 parent e790a59 commit b708d92
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion doc/source/reference/indexing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ Selecting
Index.get_slice_bound
Index.get_value
Index.get_values
Index.set_value
Index.isin
Index.slice_indexer
Index.slice_locs
Expand Down
4 changes: 2 additions & 2 deletions doc/source/whatsnew/v1.0.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ Documentation Improvements
Deprecations
~~~~~~~~~~~~

- :meth:`Index.set_values` has been deprecated. For a given index ``idx``, array ``arr``,
- `Index.set_value` has been deprecated. For a given index ``idx``, array ``arr``,
value in ``idx`` of ``idx_val`` and a new value of ``val``, ``idx.set_value(arr, idx_val, val)``
is equivalent to ``arr[idx.get_loc(idx_val) = val``, which should be used instead (:issue:`28621`).
is equivalent to ``arr[idx.get_loc(idx_val)] = val``, which should be used instead (:issue:`28621`).
-

.. _whatsnew_1000.prior_deprecations:
Expand Down
4 changes: 3 additions & 1 deletion pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ class Index(IndexOpsMixin, PandasObject):
"""

# tolist is not actually deprecated, just suppressed in the __dir__
_deprecations = DirNamesMixin._deprecations | frozenset(["tolist", "dtype_str"])
_deprecations = DirNamesMixin._deprecations | frozenset(
["tolist", "dtype_str", "set_value"]
)

# To hand over control to subclasses
_join_precedence = 1
Expand Down

0 comments on commit b708d92

Please sign in to comment.