Skip to content

DEPR: combine_first #53461

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

Open
jbrockmendel opened this issue May 31, 2023 · 5 comments
Open

DEPR: combine_first #53461

jbrockmendel opened this issue May 31, 2023 · 5 comments
Labels
Deprecate Functionality to remove in pandas Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Needs Discussion Requires discussion from core team before further action

Comments

@jbrockmendel
Copy link
Member

jbrockmendel commented May 31, 2023

I've never used it, and the implementations are slightly different between Series/DataFrame which I expect will surprise users.

@jbrockmendel jbrockmendel added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels May 31, 2023
@lithomas1 lithomas1 added Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Deprecate Functionality to remove in pandas Needs Discussion Requires discussion from core team before further action and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels May 31, 2023
@jreback
Copy link
Contributor

jreback commented May 31, 2023

see #22812

@phofl
Copy link
Member

phofl commented Jun 1, 2023

I 've used it quite often as a coalesce solution

@lukemanley
Copy link
Member

I 've used it quite often as a coalesce solution

Same, I've used this quite a bit.

I do think the method name is not obvious to new users.

I also wonder if it would be better as a top level func so rather than doing:

ser1.combine_first(ser2).combine_first(ser3)

it could be something like:

pd.coalesce([ser1, ser2, ser3])

@Jython1415
Copy link
Contributor

I'm new here but I think the comment above about switching to pd.coalesce([ser1, ser2, ser3]) connects to the discussion on #47862 that I happened to come across about what namespace these functions should fall under. @jreback's comment seems particularly relevant.

@Dr-Irv
Copy link
Contributor

Dr-Irv commented Jun 16, 2023

Just reviewed some code from my team, and they used combine_first().

So, if we deprecate, then we need a replacement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Needs Discussion Requires discussion from core team before further action
Projects
None yet
Development

No branches or pull requests

7 participants