Skip to content

Commit a1e9329

Browse files
committed
fixing the pandas.Series.argsort docstring based on review
1 parent fdd7e45 commit a1e9329

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

pandas/core/indexes/base.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2316,10 +2316,7 @@ def shift(self, periods=1, freq=None):
23162316

23172317
def argsort(self, *args, **kwargs):
23182318
"""
2319-
Return the order of the indices.
2320-
2321-
We have an object with values and index. Using argsort method
2322-
returns a series of indices that would sort the index.
2319+
Return the order of the indices that would sort the index.
23232320
23242321
Parameters
23252322
----------
@@ -2330,15 +2327,16 @@ def argsort(self, *args, **kwargs):
23302327
23312328
Returns
23322329
-------
2333-
numpy.ndarray : Argsorted indices of the index
2330+
numpy.ndarray
2331+
Argsorted indices of the index
23342332
23352333
See also
23362334
--------
2337-
numpy.ndarray.argsort : Returns the indices that would sort this array.
2335+
numpy.ndarray.argsort : Similar method for NumPy arrays.
23382336
23392337
Examples
23402338
--------
2341-
>>> s = pd.Series(data=[4,3,2,1],index=['c','b','a','d'])
2339+
>>> s = pd.Series(data=[4,3,2,1], index=['c','b','a','d'])
23422340
>>> s.index.argsort()
23432341
array([2, 1, 0, 3], dtype=int64)
23442342
"""

0 commit comments

Comments
 (0)