def write_disagg_fuel_sector(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', 'sector',
        'fueltypes', 'fuel') + '\n')
    for region, sectors in data.items():
        for sector, enduses in sectors.items():
            for enduse, fuels in enduses.items():
                for fueltype, fuel in enumerate(fuels):
                    file.write('{}, {}, {}, {}, {}'.format(str.strip(region
                        ), str.strip(enduse), str.strip(sector), str(int(
                        fueltype)), str(float(fuel)) + '\n'))
    file.close()
    return
