Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes PerformanceWarning in detect_non_wear_time_syed2021 #34

Merged
merged 2 commits into from
Nov 11, 2024

Conversation

Trybnetic
Copy link
Owner

This PR fixes a "DataFrame is highly fragmented" PerformanceWarning in detect_non_wear_time_syed2021 originating from repeatedly writing into the same DataFrame. This Warning is now prevented by first collecting all pd.Series objects and then creating one DataFrame by pd.concat(..., axis=1).

The change has been tested with real world data and still produces the same results.

Copy link

codecov bot commented Nov 11, 2024

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 72.02%. Comparing base (79b8384) to head (50f9c23).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
paat/wear_time.py 0.00% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #34   +/-   ##
=======================================
  Coverage   72.02%   72.02%           
=======================================
  Files           8        8           
  Lines         579      579           
=======================================
  Hits          417      417           
  Misses        162      162           
Flag Coverage Δ
unittests 72.02% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Trybnetic Trybnetic merged commit 095935f into main Nov 11, 2024
5 of 6 checks passed
@Trybnetic Trybnetic deleted the fix-fragmentation-warning branch November 11, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant