I have a dataset `a` which is as follows

```
       Dictionary      ActMin   ActMax
             3145      5        10
             32441     10       19
             3245      25       32
             416356    37       46
             4H22      82       130
             %ABC      1        27

```

I have another dataset `b` which is as follows

```
             ID        Test         Obs     Year
             1         3145-MN      11      1994  
             2         3145-NY      17      1992
             1         416356-FL    57      1995
             1         32441-MN     13      1995
             2         3145-MN      8       1993
             2         3245-NY      27      1983
             3         3245-FL      45      2003
             2         3145-MN      6       2001
             3         %ABC-NY      33      1996
             4         4H22-TX      97      1984

```

What I trying to do is produce an `output` like this 

```
            Id         Test         Obs     Results   Year   Description 
            1          3145-MN      11      High      1994   Tested 3145 High on 1994, 4163 High on 1995,    
            2          3145-NY      17      High      1992   Tested 3145 High on 1992
            1          416356-FL    57      High      1995
            1          32441-MN     13      Normal    1995
            2          3145-MN      8       Normal    1993
            2          3245-NY      27      Normal    1983
            3          3245-FL      45      High      2003   Tested 3245 High on 2003
            2          3145-MN      6       Normal    2001
            3          %ABC-NY      33      High      1996
            4          4H22-TX      27      Normal    1984

```

The first dataset `a` is a dictionary that stores unique test number `3145`, `3244` etc and their `Minimum` and `Maximum` values

The second dataset `b` is the actual test results dataset that stores the results of what was actually observed. The observed value for a specific test in `b` is compared to the minimum and maximum values in dataset `a`. If the observed value in `b` is greater than the actual min and max in `a` then results column should be updated as `high` , else `Normal`. The `description` column should provide a summary of tests which were listed high for each ID ( 1 summary for each ID).

Need help with this complex loop and if statements and result aggregation.