I have a dict:
{'Logistic Regression': u' precision recall f1-score support\n\n APAR Information 0.74 1.00 0.85 844\nAffected Products and Versions 0.00 0.00 0.00 18\n Answer 0.00 0.00 0.00 30\n Applicable component levels 0.96 0.85 0.90 241\n Error description 0.48 0.56 0.52 754\n Local fix 0.89 0.03 0.06 266\n Modules/Macros 0.96 0.87 0.91 326\n Problem 0.00 0.00 0.00 63\n Problem summary 0.51 0.73 0.60 721\n Related information 0.00 0.00 0.00 22\n Resolving The Problem 0.00 0.00 0.00 60\n Temporary fix 0.00 0.00 0.00 32\n circumvenion 0.00 0.00 0.00 124\n component 0.00 0.00 0.00 49\n temporary_fix 0.00 0.00 0.00 2\n\n micro avg 0.64 0.64 0.64 3552\n macro avg 0.30 0.27 0.26 3552\n weighted avg 0.60 0.64 0.58 3552\n'}
or
precision recall f1-score support
APAR Information 0.74 1.00 0.85 844
Affected Products and Versions 0.00 0.00 0.00 18
Answer 0.00 0.00 0.00 30
Applicable component levels 0.96 0.85 0.90 241
Error description 0.48 0.56 0.52 754
Local fix 0.89 0.03 0.06 266
Modules/Macros 0.96 0.87 0.91 326
Problem 0.00 0.00 0.00 63
Problem summary 0.51 0.73 0.60 721
Related information 0.00 0.00 0.00 22
Resolving The Problem 0.00 0.00 0.00 60
Temporary fix 0.00 0.00 0.00 32
circumvenion 0.00 0.00 0.00 124
component 0.00 0.00 0.00 49
temporary_fix 0.00 0.00 0.00 2
micro avg 0.64 0.64 0.64 3552
macro avg 0.30 0.27 0.26 3552
weighted avg 0.60 0.64 0.58 3552
and I want to convert this dict into a nested dict, something like,
{'Logistic Regression':
{'APAR Information':'0.74','1.00','0.85','844'},
{'Affected Products and Versions':'0.00','0.00','0.00','18'}
.
.
.}
How to achieve this ? Can it be done via dict build-in functions ?