based on my previous question : optimal web parsing
i have got nice solution, but let us suppose that i am explaining this part to my students from economic diriection, they dont know too much about web parsing, so i have decided to use directly read_html and got folloing result :
data =pd.DataFrame(pd.read_html("https://www.geostat.ge/ka/modules/categories/26/samomkhmareblo-fasebis-indeksi-inflatsia",encoding='utf-8')[0])
# data.drop(0,axis=0,inplace=True)
# data =data.droplevel(level=0,axis=1)
print(data)
0 1 ... 11 12
0 NaN 2012.0 ... 2022.0 2023.0
1 საშუალო წლიური წინა წლის საშუალო წლიურთან 99.1 ... 111.9 102.5
2 დეკემბერი წინა წლის დეკემბერთან 98.6 ... 109.8 100.4
as you see there is additional level on the top of year, how can i handle this case?