I have a pandas dataframe that has country, year, indicator, value columns.
However some countries are missing some indicator values for certain years. The value to be used for the particular year is indicated by 9999. I would like to remove the 9999s and create rows instead with that value.
Pseudo code will look like below:
for each country check each indicator Does the indicator have year {2000,2001,---2019,9999} else create row for missing year and populate from 9999 row
I am new to pandas and find it a bit difficult to translate this to Pandas. Any help/tips are much appreciated.
Thanks