Skip to content

Commit 9a4abae

Browse files
committed
CLN: @doc - indexing.py
1 parent 06a5d9e commit 9a4abae

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pandas/core/indexing.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from pandas._libs.indexing import _NDFrameIndexerBase
66
from pandas._libs.lib import item_from_zerodim
77
from pandas.errors import AbstractMethodError
8-
from pandas.util._decorators import Appender
8+
from pandas.util._decorators import doc
99

1010
from pandas.core.dtypes.common import (
1111
is_float,
@@ -90,7 +90,7 @@ class IndexingMixin:
9090

9191
@property
9292
def iloc(self) -> "_iLocIndexer":
93-
"""
93+
f"""
9494
Purely integer-location based indexing for selection by position.
9595
9696
``.iloc[]`` is primarily integer position based (from ``0`` to
@@ -123,9 +123,9 @@ def iloc(self) -> "_iLocIndexer":
123123
124124
Examples
125125
--------
126-
>>> mydict = [{'a': 1, 'b': 2, 'c': 3, 'd': 4},
127-
... {'a': 100, 'b': 200, 'c': 300, 'd': 400},
128-
... {'a': 1000, 'b': 2000, 'c': 3000, 'd': 4000 }]
126+
>>> mydict = [{{'a': 1, 'b': 2, 'c': 3, 'd': 4}},
127+
... {{'a': 100, 'b': 200, 'c': 300, 'd': 400}},
128+
... {{'a': 1000, 'b': 2000, 'c': 3000, 'd': 4000 }}]
129129
>>> df = pd.DataFrame(mydict)
130130
>>> df
131131
a b c d
@@ -871,7 +871,7 @@ def _getbool_axis(self, key, axis: int):
871871
return self.obj._take_with_is_copy(inds, axis=axis)
872872

873873

874-
@Appender(IndexingMixin.loc.__doc__)
874+
@doc(IndexingMixin.loc)
875875
class _LocIndexer(_LocationIndexer):
876876
_takeable: bool = False
877877
_valid_types = (
@@ -883,7 +883,7 @@ class _LocIndexer(_LocationIndexer):
883883
# -------------------------------------------------------------------
884884
# Key Checks
885885

886-
@Appender(_LocationIndexer._validate_key.__doc__)
886+
@doc(_LocationIndexer._validate_key)
887887
def _validate_key(self, key, axis: int):
888888

889889
# valid for a collection of labels (we check their presence later)
@@ -1342,7 +1342,7 @@ def _validate_read_indexer(
13421342
)
13431343

13441344

1345-
@Appender(IndexingMixin.iloc.__doc__)
1345+
@doc(IndexingMixin.iloc)
13461346
class _iLocIndexer(_LocationIndexer):
13471347
_valid_types = (
13481348
"integer, integer slice (START point is INCLUDED, END "
@@ -2078,7 +2078,7 @@ def __setitem__(self, key, value):
20782078
self.obj._set_value(*key, value=value, takeable=self._takeable)
20792079

20802080

2081-
@Appender(IndexingMixin.at.__doc__)
2081+
@doc(IndexingMixin.at)
20822082
class _AtIndexer(_ScalarAccessIndexer):
20832083
_takeable = False
20842084

@@ -2098,7 +2098,7 @@ def _convert_key(self, key, is_setter: bool = False):
20982098
return tuple(lkey)
20992099

21002100

2101-
@Appender(IndexingMixin.iat.__doc__)
2101+
@doc(IndexingMixin.iat)
21022102
class _iAtIndexer(_ScalarAccessIndexer):
21032103
_takeable = True
21042104

0 commit comments

Comments
 (0)