def filename_to_mes_ano(filename):
    """
    Extract and return month and year (a tuple of str) from filename 
    (str) assuming the structure:

    directory/YYYYMM_whatever.csv

    (the important part is the '/YYYYMM')
    """
    name = filename.split('/')[-1]
    ano = int(name[:4])
    mes = int(name[4:6])
    return mes, ano