Hi everyone im currently working on my school project and i need to convert my dic to dataframe in order to use it for machine learning.
myDic = {
'Acura': {
'CL': {
'2003': {
'transmission': '4',
'engine': '1',
'drivetrain': 'NHTSA: 13',
'wheels_hubs': 'NHTSA: 8',
'seat_belts_air_bags': 'NHTSA: 6',
'brakes': 'NHTSA: 6',
'lights': 'NHTSA: 5',
'body_paint': 'NHTSA: 2',
'fuel_system': 'NHTSA: 2',
'electrical': 'NHTSA: 2',
'suspension': 'NHTSA: 2',
'miscellaneous': 'NHTSA: 1',
'steering': 'NHTSA: 1'
},
'2002': {
'transmission': '2',
'engine': 'NHTSA: 8',
'brakes': 'NHTSA: 7',
'electrical': 'NHTSA: 4',
'accessories-interior': 'NHTSA: 3',
'seat_belts_air_bags': 'NHTSA: 3',
'suspension': 'NHTSA: 2',
'drivetrain': 'NHTSA: 2',
'body_paint': 'NHTSA: 1',
'accessories-exterior': 'NHTSA: 1',
'windows_windshield': 'NHTSA: 1',
'fuel_system': 'NHTSA: 1',
'steering': 'NHTSA: 1',
'miscellaneous': 'NHTSA: 1'
}
}
}
}
it goes on like that. I can search my dic as myDic['Acura']['CL']['2003']
i mean 'brand'-'model'-'year' and it gives the problems about the car. So how can i convert this into dataframe ? Columns will be brand,model,year and the problems ?