BUG: Merge_asof error message unclear when attempting to join on missing values #23189
Labels
Error Reporting
Incorrect or improved errors from pandas
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Milestone
The merge_asof function gives confusing error message when trying to join on columns which contain null values based on it failing the is_monotonic check
See example:
This can lead to scratching of heads, because hey, the DataFrame was just sorted, and it kind of looks sorted, (also doesn't appear in docs that this isn't allowed).
The proposed change will raise a more meaningful error to lead the user to the cause of the problem.
Working on a pull request with @tolaa06 which should resolve this issue
The text was updated successfully, but these errors were encountered: