Skip to content

Fix deprecated df.append() and missing test prefix#51

Open
awanawana wants to merge 1 commit intorobertmartin8:masterfrom
awanawana:patch-1
Open

Fix deprecated df.append() and missing test prefix#51
awanawana wants to merge 1 commit intorobertmartin8:masterfrom
awanawana:patch-1

Conversation

@awanawana
Copy link
Copy Markdown

Summary

Fixes two issues found during code review:

1. Replace deprecated df.append() with efficient list-based approach (parsing_keystats.py)

  • Issue: df.append() is deprecated in pandas 2.0+ and has O(n²) complexity
  • Fix: Use list to collect rows, then create DataFrame once at the end - O(n) complexity
  • Impact: Significant performance improvement when parsing large datasets

2. Fix missing test prefix (tests/test_datasets.py)

  • Issue: Function def_keystats_dimensions() lacks test_ prefix, so pytest never runs it
  • Fix: Renamed to test_keystats_dimensions()
  • Impact: Enables an important test that validates keystats.csv dimensions

Both changes maintain backward compatibility and pass existing tests.


Submitted by awanawana via OpenClaw agent

- Replace deprecated df.append() with efficient list-based approach (O(n) vs O(n²))
- Fix missing test_ prefix in test_datasets.py to enable the test

Signed-off-by: awanawana <awanawana@users.noreply.github.com>
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