I want to replace nan values in column WL1 with values in a dictionary according to the Month column
This is the dictionary: {'WL1': {1: 176.316, 2: 176.296, 3: 176.2825, 4: 176.398, 5: 176.52, 6: 176.576, 7: 176.558, 8: 176.519, 9: 176.479, 10: 176.382, 11: 176.36, 12: 176.353}}
For example, if df['Month'] == 1 and the value in WL1 is a NaN value, then we replace the nan with 176.326. If there is no nan values, we replace nothing.
Could anyone please show me how to code it out?