def get_district_data():
    district_table_list = pdfp_obj.pages[district_pg].extract_tables()[0]
    print(type(district_table_list))
    dl = []
    for (i, row) in enumerate(district_table_list):
        print(i, row)
        dl.append(list(filter((lambda x: ((x != None) and (len(x) != 0))), row)))
    dl[(- 2)] = (dl[(- 2)] + [0, 0, 0])
    print(dl)
    all_list = [[x[i] for x in dl] for i in range(0, len(dl[0]))]
    print(all_list, '*******')
    gp_breakdown_dict = {curr_list[0]: curr_list[1:] for curr_list in all_list}
    gp_breakdown_df = pd.DataFrame.from_dict(gp_breakdown_dict)
    print(gp_breakdown_df)
    gp_breakdown_df.fillna(0, inplace=True)
    gp_breakdown_df.set_index('DISTRICT', inplace=True)
    gp_breakdown_df.rename(inplace=True, columns={gp_breakdown_df.columns[0]: 'CASES', gp_breakdown_df.columns[1]: 'NEW CASES'})
    for i in range(0, 4):
        gp_breakdown_df.iloc[:, i] = gp_breakdown_df.iloc[:, i].apply((lambda x: (x if (type(x) == int) else x.replace(' ', ''))))
    return gp_breakdown_df
def get_district_data():
    district_table_list = pdfp_obj.pages[district_pg].extract_tables()[0]
    print(type(district_table_list))
    dl = []
    for (i, row) in enumerate(district_table_list):
        print(i, row)
        dl.append(list(filter((lambda x: ((x != None) and (len(x) != 0))), row)))
    dl[(- 2)] = (dl[(- 2)] + [0, 0, 0])
    print(dl)
    all_list = [[x[i] for x in dl] for i in range(0, len(dl[0]))]
    print(all_list, '*******')
    gp_breakdown_dict = {curr_list[0]: curr_list[1:] for curr_list in all_list}
    gp_breakdown_df = pd.DataFrame.from_dict(gp_breakdown_dict)
    print(gp_breakdown_df)
    gp_breakdown_df.fillna(0, inplace=True)
    gp_breakdown_df.set_index('DISTRICT', inplace=True)
    gp_breakdown_df.rename(inplace=True, columns={gp_breakdown_df.columns[0]: 'CASES', gp_breakdown_df.columns[1]: 'NEW CASES'})
    for i in range(0, 4):
        gp_breakdown_df.iloc[:, i] = gp_breakdown_df.iloc[:, i].apply((lambda x: (x if (type(x) == int) else x.replace(' ', ))))
    return gp_breakdown_df