How can it be reshaped that the columns (0 => 1, 2=> 3) are stored as records?
I.e. columns metric_name
and metric_value
and multiple rows (observations)?
pandas_dict = {0: {0: 'Model:',
1: 'Dependent Variable:',
2: 'Date:',
3: 'No. Observations:',
4: 'Df Model:',
5: 'Df Residuals:',
6: 'Converged:',
7: 'No. Iterations:'},
1: {0: 'Logit',
1: 'sick_percentage',
2: '2019-08-14 13:32',
3: '28',
4: '2',
5: '25',
6: '0.0000',
7: '35.0000'},
2: {0: 'Pseudo R-squared:',
1: 'AIC:',
2: 'BIC:',
3: 'Log-Likelihood:',
4: 'LL-Null:',
5: 'LLR p-value:',
6: 'Scale:',
7: ''},
3: {0: 'inf',
1: '6.0798',
2: '10.0764',
3: '-0.039902',
4: '0.0000',
5: '1.0000',
6: '1.0000',
7: ''}}
df = pd.DataFrame(pandas_dict)