I want to calculate based on a if statement a result as explained below. Somehow i receive only NaN and dont understand why? 

```
import pandas as pd

def Calculation(values6M, values6M3M):

    Calc = (values6M/(values6M3M/1000))          
    return Calc

df = pd.DataFrame([
        ['A', '6M3M', '1Y', 3.25],
        ['A', '6M3M', '2Y', 3.25],
        ['A', '6M3M', '3Y', 3.25],
        ['A', '6M3M', '4Y', 3.375],
        ['A', '6M3M', '5Y', 3.5],
        ['B', '6M', '1Y', 0.1475],
        ['B', '6M', '2Y', 0.15],
        ['B', '6M', '3Y', 0.155],
        ['B', '6M', '4Y', 0.18],
        ['B', '6M', '5Y', 0.21875],
        ['A', '3M', '1Y', 0.1113],
        ['A', '3M', '2Y', 0.1138],
        ['A', '3M', '3Y', 0.115],
        ['A', '3M', '4Y', 0.1175],
        ['A', '3M', '5Y', 0.1188]        
        ], columns=['Type', 'Course', 'Course_Period', 'Values'])

for index, row in df.iterrows():
    if row['Type'] in ['A', 'B'] and row['Course'] in ['6M', '6M3M']:

        test6M = df.loc[df['Course'] == '6M']        
        test6M3M = df.loc[df['Course'] == '6M3M']

        result = Calculation(test6M,test6M3M)
        print(result)

```

What I want as result is for the first value e.g. 

```
1Y: 0.1475/(3.25/1000) = 45.38461538

2Y: 46.15384615
3Y: 47.69230769
4Y: 53.33333333
5Y: 62.5

```