I have a Pandas MultiIndex DataFrame containing experimental results.(Note that it is a dataframe within a dictionary)
The DF head can be seen below:
and the tail (it is a long data set):
The DataFrame index:
This DataFrame shows two experiments (calibration_type) : sensitivity and selectivity
I can select a 'calibration_type' using x['raw_data_calibration].xs('selectivity').
How do I:
- Drop the calibration_num column (the 0 or 1 refers to the calibration_type as far as I am aware, all calibration_type=sensitivity entries have a calibration_num=1
- As can be seen in the following image. The electrode_num refers to 1 of 8 different electrodes in a sensor chip. I would like to group these and transpose them into column headers. So the output DataFrame would have the following columns: electrode_1....electrode_8, raw_time,raw_current