I have a list of dictionaries, which contain further dictionaries within it. I am using multiprocessing to process this list.
My understanding is that when you pass an iterable to pool.map()
, it basically sends individual elements(in this case a single dictionary) to the function. However, I am getting this error.
'list indices must be integers, not dict'
This is the snippet of code I am using:
pool = multiprocessing.Pool(processes=multiprocessing.cpu_count() - 1)
pool.map(perform_clean, biglist)
pool.close()
here biglist
is the [{{}}]
. Please tell me if I understanding it wrong.