In MOTAccumulator.merge_event_dataframes (Line 443), we use copy.index.map to update index.
When copy is an empty DataFrame, the size of copy.index is 0.
In this situation, copy.index.map will return an object of type Index rather than MultiIndex.
We can fix it by adding if copy.index.size != 0 before copy.index.map
In
MOTAccumulator.merge_event_dataframes
(Line 443), we usecopy.index.map
to update index. Whencopy
is an empty DataFrame, the size ofcopy.index
is 0. In this situation,copy.index.map
will return an object of typeIndex
rather thanMultiIndex
.We can fix it by adding
if copy.index.size != 0
beforecopy.index.map