From 77cf4d70d3d4b8675dba4b62ec9da01303f678f4 Mon Sep 17 00:00:00 2001 From: Qais Yousef Date: Thu, 11 Apr 2019 23:51:40 +0100 Subject: [PATCH] trace.py: improve add_events_deltas() docs To remove the ambiguity about what delta it exactly returns. Signed-off-by: Qais Yousef --- lisa/trace.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lisa/trace.py b/lisa/trace.py index ced790a32..da6314025 100644 --- a/lisa/trace.py +++ b/lisa/trace.py @@ -68,6 +68,17 @@ class TraceBase(abc.ABC): """ Store the time between each event in a new dataframe column + This function assumes that at time [n] the event starts and at [n+1] + the event stops, so the formula for the returned value is:: + + | | | + | | | + | | | + ------+--------+------------+------ + [n-1] [n] [n+1] + + delta[n] = index[n+1] - index[n] + :param df: The DataFrame to operate one :type df: pandas.DataFrame -- GitLab