di={'name':['a','b','c'],'sex':['f','m','f'],'age':[22,33,22]}
I have one dictionary and keys are name,sex,age. I have to create two more new key like
new_age and gender.
new_age is like whoever below 30 then age+5 else age+10
gender is like if m then male if f female
For your reference:
{'name':['a','b','c'],'sex':['f','m','f'],'age':[22,33,22],'gender':['female','male','female'],'new_age':[27,43,27}
What I have tried:
di={'name':['a','b','c'],'sex':['f','m','f'],'age':[22,33,22]}
I have one dictionary and keys are name,sex,age. I have to create two more new key like
new_age and gender.
new_age is like whoever below 30 then age+5 else age+10
gender is like if m then male if f female
For your reference:
{'name':['a','b','c'],'sex':['f','m','f'],'age':[22,33,22],'gender':['female','male','female'],'new_age':[27,43,27}