Hey all I am new to python.i need your help to create a data frame.
I need 5 columns(category,service,profile,os,price) in my data frame. The data is in nested form under every category(Com,DB) we have different services(ABC,XYZ) under every service there are different profile(SMALL, medium,VP,ram) ,for every profile we have os(some profile dont have os) and price.
Category service profile os price
Com ABC SMALL Windows8 2
Com ABC SMALL linux 10
Com ABC medium windows8 10
Com ABC medium linux 20
DB XYZ VP 2
DB XYZ ram 4
ABC={
'SMALL': {
'Windows8':2,
'linux':10
},
'medium':{
'Windows8':10,
'linux': 20
}
},
XYZ={
'Vp':2,
'ram':4
}
What I have tried:
i tried using for loop to get the data and after getting the data i converted that data in to dataframe.i am getting the data but not as mentioned in the description.