In some datasets, some index fields (like idx_movement_on) are floats and cause an indexing error in the restrict_to_interval. A quick fix is the following:
Issue is related to some nan values in the idx_movement_on which turns the whole column to float, instead of int.
The quick fix above shouldn't actually work, because np.int64(np.nan) should throw a ValueError which it doesn't, probably because of this pandas bug.
In some datasets, some index fields (like
idx_movement_on
) are floats and cause an indexing error in therestrict_to_interval
. A quick fix is the following:df_['idx_movement_on'] = np.int64(df_.idx_movement_on)