I have two columns of numbers: one column a record of student SAT scores, and another, their corresponding scores on the ACT test in a python pandas dataframe. 

```
     SAT Score  ACT Score
0       2160.0       32.0
1       1890.0        NaN
2       1720.0       27.0
3       2160.0       34.0
4       2150.0       32.0
5       1310.0       31.0
6       2220.0        NaN
7       2250.0        NaN
8       2170.0        NaN
9       2080.0        NaN
10      2310.0       34.0

```

The dictionary I have created looks like this:

```
score_dict = {"36": 2390, "35":2330, "34": 2260, "33": 2170, "32": 2110, "31": 2040, "30": 1990, "29":1920, "28": 1850, "27": 1810, "26": 1760, "25":1700, "24": 1640, "23": 1570, "22": 1530}"}

```

I'd like to replace dict keys with their respective dict values when either SAT or ACT scores are missing. I'm not sure how to finish the code. 

```
M = df['SAT Score']
N = df['ACT Score']

for index in range(len(M)):
    i = N[index]
    k = M[index]
    if k != k *1:
       for key, value in score_dict.items():
            ....

```

This is as far as I got. 

I have some NaN values in the SAT Column. My logic was to first look at SAT scores with NaNs in them (k != k\*1), then for those rows look at the corresponding ACT scores. I would then use dictionary to look replace the missing SAT scores with the corresponding ACT scores by using
 the dictionary.