Skip to content

Commit

Permalink
fix(exclusion): check if all data is NA and exit early if so
Browse files Browse the repository at this point in the history
  • Loading branch information
chanshing committed Sep 16, 2024
1 parent 688c9d2 commit c8f838b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stepcount/stepcount.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def main():
data = utils.exclude_wear_below_days(data, args.exclude_wear_below)

# If no data left, save info and exit early
if len(data) == 0:
if len(data) == 0 or data.isna().all().all():
print("No data left after exclusion. Exiting early...")
# Reset start, end, wear time, etc.
info['StartTime'] = None
Expand Down

0 comments on commit c8f838b

Please sign in to comment.