from datetime import datetime
import pandas as pd
import numpy as np
df = pd.DataFrame({"ID" : ["1", "2", "3"],
"Date" : ["12/11/2020", "12/10/2020", "05/04/2020"]})
df['Month_diff'] = round(((datetime.now() - pd.to_datetime(df.Date,infer_datetime_format=True,dayfirst=True))/np.timedelta64(1, 'M'))-0.5)
This would be a one-liner where you are transforming the column Date to datetimeformat and then performing the operation. Output:
ID Date Month_diff
0 1 12/11/2020 1.0
1 2 12/10/2020 2.0
2 3 05/04/2020 8.0