def write_disagg_fuel(path_to_txt, data):
    """Write out disaggregated fuel

    Arguments
    ----------
    path_to_txt : str
        Path to txt file
    data : dict
        Data to write out
    """
    file = open(path_to_txt, 'w')
    file.write('{}, {}, {}, {}'.format('region', 'enduse', 'fueltypes',
        'fuel') + '\n')
    for region, enduses in data.items():
        for enduse, fuels in enduses.items():
            for fueltype, fuel in enumerate(fuels):
                file.write('{}, {}, {}, {}'.format(str.strip(region), str.
                    strip(enduse), str(int(fueltype)), str(float(fuel)) + '\n')
                    )
    file.close()
    return
