Apologies for the image but I'm not sure how to reproduce this as I was given this data...
I simply want to convert this into a simple dataframe where I have index columns time, lon, lat and the values in respective rows like so:
| time | lat | lon | data |
I tried doing .reset_index() but the time axis still goes across and not downward. How can I "explode" all the index values to get a simple dataframe with all index in columns?
Edit:
Dictionary of test data for reproducing:
{Timestamp('2001-01-01 00:00:00'): {(50.18000030517578,
-5.6199951171875): -1.68,
(50.18000030517578, -4.9200439453125): -1.88,
(50.18000030517578, -4.219970703125): -2.08},
Timestamp('2001-01-02 00:00:00'): {(50.18000030517578,
-5.6199951171875): -1.95,
(50.18000030517578, -4.9200439453125): -2.25,
(50.18000030517578, -4.219970703125): -2.55},
Timestamp('2001-01-03 00:00:00'): {(50.18000030517578,
-5.6199951171875): -0.76,
(50.18000030517578, -4.9200439453125): -0.91,
(50.18000030517578, -4.219970703125): -1.06},
Timestamp('2001-01-04 00:00:00'): {(50.18000030517578,
-5.6199951171875): -2.9,
(50.18000030517578, -4.9200439453125): -3.01,
(50.18000030517578, -4.219970703125): -3.11},
Timestamp('2001-01-05 00:00:00'): {(50.18000030517578,
-5.6199951171875): -2.06,
(50.18000030517578, -4.9200439453125): -2.29,
(50.18000030517578, -4.219970703125): -2.52}}

df.head(5).to_dict()from this I canpd.DataFrame(...)