'Fill NaN from another adataframe based on a column
I have one dataframe with shape (23251, 8) and another dataframe with shape (3652, 14). The DATE column in the first dataframe contains dates from 1955-01-01 up to 2020-12-31 and the DATA column in the second contains dates from 2010-01-01 to 2019-12-31.In the first dataframe the majority of the columns contains few or many missing values. I want to fill the missing values in the in the first dataframe(whenever is possible) from the second dataframe based on the DATE(where the DATE in the second dataframe matches the DATE in the first dataframe ).
The first Dataframe:
The second Dataframe:
To make it clear I want, if the rows(from the first dataframe) that refer to date from 2010-01-01 to 2019-12-31 contain NaN in columns PRCP, TAVG, TMAX and in TMIN to be filled with the values from the second dataframe based on the critirion that the DATE in each row matches betwwen the two dataframes.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|


