pandas-dev / pandas

Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
https://pandas.pydata.org
BSD 3-Clause "New" or "Revised" License
42.57k stars 17.56k forks source link

ENH: merge_asof with "how” functionality #59137

Open SterArcher opened 2 days ago

SterArcher commented 2 days ago

Feature Type

Problem Description

Hi, i have a problem when merge_asof is the perfect method, but it returns error when there are missing values in left data frame.

ValueError: Merge keys contain null values on left side

The classic merge function already has this option, where you can specify inner, outer.

Thank you!

Feature Description

I would recommend to add "how" parameter to merge_asof function.

Alternative Solutions

Na

Additional Context

https://stackoverflow.com/questions/64723478/do-full-outer-join-with-pandas-merge-asof/64723601#64723601

https://github.com/pandas-dev/pandas/issues/23189#issue-370772961