I have produced a GeoPandas geodataframe (attached) with rows containing "loss_year" between 2001 and 2021, and some area values (pictured).
I wish to append the omitted years between 2001 - 2021 to the gdf, assigning 0 values to the geometry, area_ha and area_perc collumns. I will drop the geometry column before writing to a CSV.
Here is some pseudocode:
"""
for yr in 2000 - 2021:
if yr not in gdf.loss_year:
results.append({'loss_year'[yr], 'area_ha': 0.00, 'area_perc' : 0})
"""