Skip to content

Commit 00e16b7

Browse files
committed
defend against indexing in split
1 parent 29da4c2 commit 00e16b7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

data_algebra/pandas_base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,8 @@ def blocks_to_rowrecs(self, data, *, blocks_in):
11081108
split = [v for k, v in data.groupby(blocks_in.control_table_keys)]
11091109
else:
11101110
split = [v for k, v in data.groupby(blocks_in.control_table_keys[0])]
1111+
# make sure no row-index bull
1112+
split = [s.reset_index(drop=True, inplace=False) for s in split]
11111113
# check same number of ids for each block
11121114
# could also double check id columns are identical
11131115
for i in range(1, len(split)):

0 commit comments

Comments
 (0)