Merged
Show file tree
Hide file tree
Changes from all commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Failed to load files.
Original file line numberDiff line numberDiff line change
Expand Up@@ -446,6 +446,7 @@ Reshaping
^^^^^^^^^
- Bug in :func:`crosstab` when ``dropna=False`` would not keep ``np.nan`` in the result (:issue:`10772`)
- Bug in :func:`merge_asof` raising ``KeyError`` for extension dtypes (:issue:`52904`)
- Bug in :func:`merge_asof` raising ``ValueError`` for data backed by read-only ndarrays (:issue:`53513`)
- Bug in :meth:`DataFrame.agg` and :meth:`Series.agg` on non-unique columns would return incorrect type when dist-like argument passed in (:issue:`51099`)
- Bug in :meth:`DataFrame.idxmin` and :meth:`DataFrame.idxmax`, where the axis dtype would be lost for empty frames (:issue:`53265`)
- Bug in :meth:`DataFrame.merge` not merging correctly when having ``MultiIndex`` with single level (:issue:`52331`)
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -50,28 +50,28 @@ def outer_join_indexer(
npt.NDArray[np.intp],
]: ...
def asof_join_backward_on_X_by_Y(
left_values: np.ndarray, # asof_t[:]
right_values: np.ndarray, # asof_t[:]
left_by_values: np.ndarray, # by_t[:]
right_by_values: np.ndarray, # by_t[:]
left_values: np.ndarray, # ndarray[numeric_t]
right_values: np.ndarray, # ndarray[numeric_t]
left_by_values: np.ndarray, # ndarray[by_t]
right_by_values: np.ndarray, # ndarray[by_t]
allow_exact_matches: bool = ...,
tolerance: np.number | float | None = ...,
use_hashtable: bool = ...,
) -> tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]]: ...
def asof_join_forward_on_X_by_Y(
left_values: np.ndarray, # asof_t[:]
right_values: np.ndarray, # asof_t[:]
left_by_values: np.ndarray, # by_t[:]
right_by_values: np.ndarray, # by_t[:]
left_values: np.ndarray, # ndarray[numeric_t]
right_values: np.ndarray, # ndarray[numeric_t]
left_by_values: np.ndarray, # ndarray[by_t]
right_by_values: np.ndarray, # ndarray[by_t]
allow_exact_matches: bool = ...,
tolerance: np.number | float | None = ...,
use_hashtable: bool = ...,
) -> tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]]: ...
def asof_join_nearest_on_X_by_Y(
left_values: np.ndarray, # asof_t[:]
right_values: np.ndarray, # asof_t[:]
left_by_values: np.ndarray, # by_t[:]
right_by_values: np.ndarray, # by_t[:]
left_values: np.ndarray, # ndarray[numeric_t]
right_values: np.ndarray, # ndarray[numeric_t]
left_by_values: np.ndarray, # ndarray[by_t]
right_by_values: np.ndarray, # ndarray[by_t]
allow_exact_matches: bool = ...,
tolerance: np.number | float | None = ...,
use_hashtable: bool = ...,
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -679,10 +679,10 @@ ctypedef fused by_t:
uint64_t


def asof_join_backward_on_X_by_Y(numeric_t[:] left_values,
numeric_t[:] right_values,
by_t[:] left_by_values,
by_t[:] right_by_values,
def asof_join_backward_on_X_by_Y(ndarray[numeric_t] left_values,
ndarray[numeric_t] right_values,
ndarray[by_t] left_by_values,
ndarray[by_t] right_by_values,
bint allow_exact_matches=True,
tolerance=None,
bint use_hashtable=True):
Expand DownExpand Up@@ -756,10 +756,10 @@ def asof_join_backward_on_X_by_Y(numeric_t[:] left_values,
return left_indexer, right_indexer


def asof_join_forward_on_X_by_Y(numeric_t[:] left_values,
numeric_t[:] right_values,
by_t[:] left_by_values,
by_t[:] right_by_values,
def asof_join_forward_on_X_by_Y(ndarray[numeric_t] left_values,
ndarray[numeric_t] right_values,
ndarray[by_t] left_by_values,
ndarray[by_t] right_by_values,
bint allow_exact_matches=1,
tolerance=None,
bint use_hashtable=True):
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -2142,13 +2142,13 @@ def injection(obj):
# we've verified above that no nulls exist
left_values = left_values._data
elif isinstance(left_values, ExtensionArray):
left_values = np.array(left_values)
left_values = left_values.to_numpy()

if isinstance(right_values, BaseMaskedArray):
# we've verified above that no nulls exist
right_values = right_values._data
elif isinstance(right_values, ExtensionArray):
right_values = np.array(right_values)
right_values = right_values.to_numpy()

# a "by" parameter requires special handling
if self.left_by is not None:
Expand Down