I have a pandas Series where the index is a StructType. I want to explode this index into the structfields.
index | value |
---|---|
(2005-07-03, beta0) | 0.997160 |
(2005-07-03, beta1) | 0.037629 |
(2005-07-03, beta2) | 0.037629 |
(2005-07-03, tau) | 2.000000 |
(2011-11-13, beta0) | 0.997160 |
Here the index is of the structype key: struct<checkin_week:date,parameter:string>
I need to explode it two columns such that I have a column for checkin_week and another column for parameter.