I need to find the median month value between two dates in a date frame. I am simplifying the case by showing four examples.

```
import pandas as pd
import numpy as np
import datetime
df=pd.DataFrame([["1/31/2016","3/1/2016"],
                 ["6/15/2016","7/14/2016"],
                 ["7/14/2016","8/15/2016"], 
                 ["8/7/2016","9/6/2016"]], columns=['FromDate','ToDate'])

df['Month'] = df.ToDate.dt.month-df.FromDate.dt.month

```

I am trying to append a column but I am not getting the desired result.
I need to see these values: `[2,6,7,8]`.