Merge branch 'master' of https://github.com/laixintao/panwid
Tony Cebzanov
6 years ago
50 | 50 | def append_rows(self, rows): |
51 | 51 | |
52 | 52 | colnames = list(self.columns) |
53 | length = len(rows) | |
53 | 54 | |
54 | 55 | try: |
55 | 56 | columns = list(set().union(*(list(d.keys()) for d in rows))) |
60 | 61 | )) |
61 | 62 | ) |
62 | 63 | if self.index_name not in columns: |
63 | index = list(range(len(self), len(list(data.values())[0]))) | |
64 | index = list(range(len(self), len(self) + length)) | |
64 | 65 | data[self.index_name] = index |
65 | 66 | else: |
66 | 67 | index = data[self.index_name] |