We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf280b3 commit 7397d9dCopy full SHA for 7397d9d
src/actipy/processing.py
@@ -75,7 +75,7 @@ def quality_control(data, sample_rate):
75
info['EndTime'] = data.index[-1].strftime(time_format)
76
info['NumTicks'] = len(data)
77
tol = pd.Timedelta('1s')
78
- tdiff = data.dropna().index.to_series().diff() # Note: Index.diff() was only added in pandas 2.1
+ tdiff = data.dropna(subset=['x', 'y', 'z']).index.to_series().diff() # Note: Index.diff() was only added in pandas 2.1
79
total_time = tdiff[tdiff < tol].sum().total_seconds()
80
num_interrupts = (tdiff > tol).sum()
81
del tdiff # we're done with this
0 commit comments