@@ -984,39 +984,22 @@ def _get_insert_freq(self, loc: int, item):
984984 def delete (self , loc ) -> Self :
985985 """
986986 Make new Index with passed location(-s) deleted.
987+
987988 Parameters
988989 ----------
989990 loc : int or list of int
990991 Location of item(-s) which will be deleted.
991992 Use a list of locations to delete more than one value at the same time.
993+
992994 Returns
993995 -------
994996 Index
995997 Will be same type as self, except for RangeIndex.
998+
996999 See Also
9971000 --------
9981001 numpy.delete : Delete any rows and column from NumPy array (ndarray).
999- Examples
1000- --------
1001- >>> idx = pd.Index(["a", "b", "c"])
1002- >>> idx.delete(1)
1003- Index(['a', 'c'], dtype='str')
1004- >>> idx = pd.Index(["a", "b", "c"])
1005- >>> idx.delete([0, 2])
1006- Index(['b'], dtype='str')
1007- Make new Index with passed location(-s) deleted.
1008- Parameters
1009- ----------
1010- loc : int or list of int
1011- Location of item(-s) which will be deleted.
1012- Use a list of locations to delete more than one value at the same time.
1013- Returns
1014- -------
1015- Index
1016- Will be same type as self, except for RangeIndex.
1017- See Also
1018- --------
1019- numpy.delete : Delete any rows and column from NumPy array (ndarray).
1002+
10201003 Examples
10211004 --------
10221005 >>> idx = pd.Index(["a", "b", "c"])
@@ -1032,43 +1015,26 @@ def delete(self, loc) -> Self:
10321015
10331016 def insert (self , loc : int , item ):
10341017 """
1035- Make new Index inserting new item at location.
1036- Follows Python numpy.insert semantics for negative values.
1037- Parameters
1038- ----------
1039- loc : int
1040- The integer location where the new item will be inserted.
1041- item : object
1042- The new item to be inserted into the Index.
1043- Returns
1044- -------
1045- Index
1046- Returns a new Index object resulting from inserting the specified item at
1047- the specified location within the original Index.
1048- See Also
1049- --------
1050- Index.append : Append a collection of Indexes together.
1051- Examples
1052- --------
1053- >>> idx = pd.Index(["a", "b", "c"])
1054- >>> idx.insert(1, "x")
1055- Index(['a', 'x', 'b', 'c'], dtype='str')
10561018 Make new Index inserting new item at location.
10571019 Follows Python numpy.insert semantics for negative values.
1020+
10581021 Parameters
10591022 ----------
10601023 loc : int
10611024 The integer location where the new item will be inserted.
10621025 item : object
10631026 The new item to be inserted into the Index.
1027+
10641028 Returns
10651029 -------
10661030 Index
10671031 Returns a new Index object resulting from inserting the specified item at
10681032 the specified location within the original Index.
1033+
10691034 See Also
10701035 --------
10711036 Index.append : Append a collection of Indexes together.
1037+
10721038 Examples
10731039 --------
10741040 >>> idx = pd.Index(["a", "b", "c"])
0 commit comments