Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • This is the actualized code that my brain wanted to think of but did not (-: Commented May 3, 2019 at 21:37
  • @piRSquared haha , I think hard to find something different Commented May 3, 2019 at 21:38
  • 1
    Same idea but with loc... a.loc[a.index[a.id.searchsorted(b.id)], 'val'] = [*b.val] Commented May 3, 2019 at 21:42
  • 1
    How would this be done when id is actually a combination of multiple columns? Commented May 3, 2019 at 21:54