How to explode a struct index in pandas series

Viewed 22

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.

0 Answers
Related