Phase 3: add summary() descriptive statistics - #11
Open
mewincaka wants to merge 17 commits into
Open
Conversation
Implement epydem.summary() for computing descriptive statistics on epidemiological DataFrames with conservative defaults (n-only when no column lists specified), date/numeric/categorical metrics, deterministic categorical tie-breaking, and long/wide output formats. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
Author
|
CI still running ⏳ (pending). PR: #11 |
1 similar comment
Collaborator
Author
|
CI still running ⏳ (pending). PR: #11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
epydem.summary(df, by, date_cols, numeric_cols, categorical_cols, top_k, output)for descriptive statistics on epidemiological DataFramesnwhen no column lists are specified (no auto-inference)nper group, missingness (missing_n,missing_pct), date (min/maxafterpd.to_datetimecoercion), numeric (count/mean/std/min/p25/median/p75/max), categorical (top-k with deterministic tie-break: count desc, string asc;<NA>token)"long"(default) and"wide"(pivoted)Checklist
epydem/summary.py— full implementationepydem/__init__.py— exportsummarytests/test_summary.py— 21 tests across 6 classesbyvs no-bynbehaviorsummary()Test plan
pytest tests/— all 32 tests pass (11 existing + 21 new)summary(df)with no column lists returns onlyn"NOT_A_DATE"are counted as missing after coercionCloses #10
🤖 Generated with Claude Code