Skip to content

Commit f393803

Browse files
committed
Add docstring and change sorting in join function for compatibility
1 parent 3cd7ed5 commit f393803

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

Diff for: pandas/_libs/lib.pyx

+14
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,20 @@ def item_from_zerodim(val: object) -> object:
201201
@cython.wraparound(False)
202202
@cython.boundscheck(False)
203203
def fast_unique_multiple(list arrays, sort: bool=True):
204+
"""
205+
Generate a list of unique values from a list of arrays.
206+
207+
Parameters
208+
----------
209+
list : array-like
210+
A list of array-like objects
211+
sort : boolean
212+
Whether or not to sort the resulting unique list
213+
214+
Returns
215+
-------
216+
unique_list : list of unique values
217+
"""
204218
cdef:
205219
ndarray[object] buf
206220
Py_ssize_t k = len(arrays)

Diff for: pandas/core/indexes/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3244,9 +3244,9 @@ def join(self, other, how='left', level=None, return_indexers=False,
32443244
elif how == 'right':
32453245
join_index = other
32463246
elif how == 'inner':
3247-
join_index = self.intersection(other, sort=sort)
3247+
join_index = self.intersection(other, sort=False)
32483248
elif how == 'outer':
3249-
join_index = self.union(other, sort=sort)
3249+
join_index = self.union(other)
32503250

32513251
if sort:
32523252
join_index = join_index.sort_values()

0 commit comments

Comments
 (0)