I have found a solution but it is really slow:
def chunks(self,data, SIZE=10000): for i in xrange(0, len(data), SIZE): yield dict(data.items()[i:i+SIZE])
Do you have any ideas without using external modules (numpy and etc.)
I have found a solution but it is really slow:
def chunks(self,data, SIZE=10000): for i in xrange(0, len(data), SIZE): yield dict(data.items()[i:i+SIZE])
Do you have any ideas without using external modules (numpy and etc.)