Skip to content

Commit a4219c5

Browse files
docs: Fixed doctests in indexes/datetimelike.py
1 parent 9123202 commit a4219c5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/core/indexes/base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,7 @@ def astype(self, dtype: Dtype, copy: bool = True):
12091209
--------
12101210
>>> idx = pd.Index(['a', 'b', 'c'])
12111211
>>> idx.take([2, 2, 1, 2])
1212-
Index(['c', 'c', 'b', 'c'], dtype='object')
1212+
Index(['c', 'c', 'b', 'c'], dtype='str')
12131213
"""
12141214

12151215
@Appender(_index_shared_docs["take"] % _index_doc_kwargs)
@@ -6862,11 +6862,11 @@ def delete(
68626862
--------
68636863
>>> idx = pd.Index(["a", "b", "c"])
68646864
>>> idx.delete(1)
6865-
Index(['a', 'c'], dtype='object')
6865+
Index(['a', 'c'], dtype='str')
68666866
68676867
>>> idx = pd.Index(["a", "b", "c"])
68686868
>>> idx.delete([0, 2])
6869-
Index(['b'], dtype='object')
6869+
Index(['b'], dtype='str')
68706870
"""
68716871
values = self._values
68726872
res_values: ArrayLike
@@ -6906,7 +6906,7 @@ def insert(self, loc: int, item) -> Index:
69066906
--------
69076907
>>> idx = pd.Index(["a", "b", "c"])
69086908
>>> idx.insert(1, "x")
6909-
Index(['a', 'x', 'b', 'c'], dtype='object')
6909+
Index(['a', 'x', 'b', 'c'], dtype='str')
69106910
"""
69116911
item = lib.item_from_zerodim(item)
69126912
if is_valid_na_for_dtype(item, self.dtype) and self.dtype != object:

0 commit comments

Comments
 (0)