def month_difference(a, b):
    """
    Calculates difference in months between two datetime objects

    Args:
    a (pandas datetime object) latest datetime object
    b (pandas datetime object) earliest datetime object
    
    Returns:
    integer value of months between two dates
    """
    return 12 * (a.year - b.year) + (a.month - b.month)