I have pandas to extract the data from excel files and adding them to a dataframe using the following code
flow_df_temp = {'date': date_fmt_csv, 'point_id': point_id_list_flow,'water_flow': water_list_flow}
flow_df = flow_df.append(flow_df_temp, ignore_index=True)`
Output that I get.
date point_id aggregated_flow
0 10/02/2022 [7, 8, 9] [2.353, 55.51, 28.792]
1 10/01/2022 [7, 8, 9] [6.281, 53.444, 23.371]
The following is the output that I want.
date point_id aggregated_flow
10/02/2022 7 2.353
10/02/2022 8 55.51
10/02/2022 9 28.792
10/01/2022 7 6.281
10/01/2022 8 53.444
10/02/2022 9 23.371
I have tried to run some loops but not been able to figure out the logic.
Any update will be much appreciated.