To start, I have the following dataframes, A and B. Below is the result I am trying to output the following.
To sum up the goal, I am looking to create a resulting dataframe where:
- I use df A as the base (it has more columns than B that I'd like to keep)
- If a value is None in A and a number in B, I take B.
- If a value is a number in both, I take B.
- If a value is a number in A but None in B, I take A.
Any suggestions? Also, if there is a way of doing this through a SQL query, that would work as well.