@@ -1209,7 +1209,7 @@ def astype(self, dtype: Dtype, copy: bool = True):
1209
1209
--------
1210
1210
>>> idx = pd.Index(['a', 'b', 'c'])
1211
1211
>>> idx.take([2, 2, 1, 2])
1212
- Index(['c', 'c', 'b', 'c'], dtype='object ')
1212
+ Index(['c', 'c', 'b', 'c'], dtype='str ')
1213
1213
"""
1214
1214
1215
1215
@Appender (_index_shared_docs ["take" ] % _index_doc_kwargs )
@@ -6862,11 +6862,11 @@ def delete(
6862
6862
--------
6863
6863
>>> idx = pd.Index(["a", "b", "c"])
6864
6864
>>> idx.delete(1)
6865
- Index(['a', 'c'], dtype='object ')
6865
+ Index(['a', 'c'], dtype='str ')
6866
6866
6867
6867
>>> idx = pd.Index(["a", "b", "c"])
6868
6868
>>> idx.delete([0, 2])
6869
- Index(['b'], dtype='object ')
6869
+ Index(['b'], dtype='str ')
6870
6870
"""
6871
6871
values = self ._values
6872
6872
res_values : ArrayLike
@@ -6906,7 +6906,7 @@ def insert(self, loc: int, item) -> Index:
6906
6906
--------
6907
6907
>>> idx = pd.Index(["a", "b", "c"])
6908
6908
>>> idx.insert(1, "x")
6909
- Index(['a', 'x', 'b', 'c'], dtype='object ')
6909
+ Index(['a', 'x', 'b', 'c'], dtype='str ')
6910
6910
"""
6911
6911
item = lib .item_from_zerodim (item )
6912
6912
if is_valid_na_for_dtype (item , self .dtype ) and self .dtype != object :
0 commit comments