Skip to content

DOC: Improving (hopefully) the documintation #29449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions pandas/_libs/algos.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ cpdef ndarray[int64_t, ndim=1] unique_deltas(const int64_t[:] arr):

Returns
-------
result : ndarray[int64_t]
result is sorted
ndarray[int64_t]
An ordered ndarray[int64_t]
"""
cdef:
Py_ssize_t i, n = len(arr)
Expand Down Expand Up @@ -150,9 +150,10 @@ def is_lexsorted(list_of_arrays: list) -> bint:
@cython.wraparound(False)
def groupsort_indexer(const int64_t[:] index, Py_ssize_t ngroups):
"""
compute a 1-d indexer that is an ordering of the passed index,
ordered by the groups. This is a reverse of the label
factorization process.
Compute a 1-d indexer.

The indexer is an ordering of the passed index,
ordered by the groups.

Parameters
----------
Expand All @@ -161,7 +162,14 @@ def groupsort_indexer(const int64_t[:] index, Py_ssize_t ngroups):
ngroups: int64
number of groups

return a tuple of (1-d indexer ordered by groups, group counts)
Returns
-------
tuple
1-d indexer ordered by groups, group counts

Notes
-----
This is a reverse of the label factorization process.
"""

cdef:
Expand Down Expand Up @@ -391,6 +399,7 @@ def _validate_limit(nobs: int, limit=None) -> int:
Returns
-------
int
The limit.
"""
if limit is None:
lim = nobs
Expand Down Expand Up @@ -669,7 +678,8 @@ def is_monotonic(ndarray[algos_t, ndim=1] arr, bint timelike):
"""
Returns
-------
is_monotonic_inc, is_monotonic_dec, is_unique
tuple
is_monotonic_inc, is_monotonic_dec, is_unique
"""
cdef:
Py_ssize_t i, n
Expand Down