This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Count number of values in a nested dictionary

I have list with nested dictionaries in it

 [{'conserved': False,
  'id': ['lcl|Query_10002/1-436',
   'lcl|Query_10003/1-463',
   'lcl|Query_10004/1-437',
   'lcl|Query_10047/1-437',
   'lcl|Query_10048/1-437',
   'lcl|Query_10049/1-437',
   'lcl|Query_10010/1-439',]},
 {'conserved': True,
  'id': ['lcl|Query_10001/1-490',
   'lcl|Query_10005/1-460',
   'lcl|Query_10006/1-460',
   'lcl|Query_10007/1-460',
   'lcl|Query_10008/1-460',
   'lcl|Query_10009/1-460',
   'lcl|Query_10022/1-458',']}]

I wanted to count the number of id's for the false and true occurances. I was just wondering if there is a quick function to do this

values nested dictionary

This is actually more of a python question rather than bioinformatics, so you might be better off asking this in a place like Stack overflow. In any case, what have you tried so far?

0 answers

No answers yet.

Log in to answer this question.