Created
April 20, 2023 19:53
-
-
Save MilesDowe/d057b2e8d26d52d437b2adbc23f72f58 to your computer and use it in GitHub Desktop.
Simple way to update a column of a DF using values from another, similar DF.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bad = bad.set_index('KeyCol').MissingCol.dropna() | |
good.fillna(good.drop('MissingCol', 1).join(bad, on='KeyCol')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment