Skip to content

Commit 7913186

Browse files
committed
Docs
1 parent f9b0b49 commit 7913186

File tree

1 file changed

+30
-7
lines changed

1 file changed

+30
-7
lines changed

pandas/core/arrays/base.py

+30-7
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,22 @@ def __getitem__(self, item):
3333
# type (Any) -> Any
3434
"""Select a subset of self.
3535
36-
Notes
37-
-----
38-
``item`` may be one of
36+
Parameters
37+
----------
38+
item : int, slice, or ndarray
39+
* int: The position in 'self' to get.
3940
40-
* A scalar integer position
41-
* A slice object, where 'start', 'stop', and 'step' are
41+
* slice: A slice object, where 'start', 'stop', and 'step' are
4242
integers or None
43-
* A 1-d boolean NumPy ndarray the same length as 'self'
4443
44+
* ndarray: A 1-d boolean NumPy ndarray the same length as 'self'
45+
46+
Returns
47+
-------
48+
item : scalar or ExtensionArray
49+
50+
Notes
51+
-----
4552
For scalar ``item``, return a scalar value suitable for the array's
4653
type. This should be an instance of ``self.dtype.type``.
4754
@@ -60,6 +67,12 @@ def __setitem__(self, key, value):
6067

6168
@abc.abstractmethod
6269
def __len__(self):
70+
"""Length of this array
71+
72+
Returns
73+
-------
74+
length : int
75+
"""
6376
# type: () -> int
6477
pass
6578

@@ -149,7 +162,17 @@ def take(self, indexer, allow_fill=True, fill_value=None):
149162
@abc.abstractmethod
150163
def copy(self, deep=False):
151164
# type: (bool) -> ExtensionArray
152-
"""Return a copy of the array."""
165+
"""Return a copy of the array.
166+
167+
Parameters
168+
----------
169+
deep : bool, default False
170+
Also copy the underlying data backing this array.
171+
172+
Returns
173+
-------
174+
ExtensionArray
175+
"""
153176

154177
# ------------------------------------------------------------------------
155178
# Block-related methods

0 commit comments

Comments
 (0)