I have about 75k JSON files with this dictionary format
{ 'test_outcomes':
{'test1': 1, ##1 or 0 if the test passed or failed, respectively
'test2': 0,
'test3': 1,
...,
'testN': 1,},
'test_data':
{'test1': data,
'test2': data,
...,
'testN':data}
}
I want to be able to list which tests failed from the test_outcomes
, access data from each test in test_data
(also access data whether or not the test passed or failed), and then sum how many files passed or failed each test. I want to be able to list data from each test so that they can be used for plotting.
I have been able to query the following information through scheme similar to:
test1data = []
for data in mycol.find({},{"test_data":1}):
if 'test1' in data['test_data']:
test1data.append(data['test_data']['test1'])
and I can apply some similar filters by writing conditionals in the for loop, but this querying time is very slow and I was wondering if there was a more efficient way to achieve this?
SC990987 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.