utils/trace: Add squash_df() method
This method takes in a dataframe with a time delta column (as created by addEventsDeltas), and slices it to fit within a given interval. Instead of writing a wall of text, here's what it's doing: df is: Time len state 15 1 1 16 1 0 17 1 1 18 1 0 ------------- squash_df(df, 16.5, 17.5) => Time len state 16.5 .5 0 17 .5 1 squash_df(df, 16.2, 16.8) => Time len state 16.2 .6 0
Loading
Please register or sign in to comment