How to handle big data?

it can be related to IndexError: Invalid key: 16 is out of bounds for size 0 - #3 by Isma