I see. The way I usually debug these kinds of issues, I put print statements in multiple places to find the inconsistency. So, for example I would check the the size of self.df and self.frames in__getitem__ as well as different parts of __init__ with print('Inside getitem :: ', len(self.df), len(self.frames)).
Perhaps at some point these arrays/lists have different sizes, and that is causing the error.