I need to extract a subset of data for products requested by E2301
. I can do so but it is produces the output in a table format, which is considered incorrect for my assignment.
My code:
e2301=data[data['requester_id'] == 'E2301']
I need the answer in this format:
[{‘tech_approval_required’: 0,
‘requester_id’: ‘E2301’,
‘role’: “tech’, product’: ‘Desktop Computer’,
‘quantity’: 4,
‘price’: 798,
“total’: 3192},
{‘tech_ approval_required’: 0, requester_id’: ‘E2301’,
‘role’: ‘tech’,
‘product’: ‘Keyboard’,
‘quantity’: 4, price : 373,
‘total’: 1492},
val _required’:
0,
id’:
“tech’,
‘E2301’
‘Mouse’,
3,
1, _required’:
id’:
‘E2301′,
ch’,
‘Desk’
4,
15,
}]
Emma Dolson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.