Saylor InnovationsSAYLOR INNOVATIONS

Home / Guides / Self-Hosting & Infra

pandas groupby and resample Gotchas: Dropped NaN Groups, count vs size, transform and Empty Periods

Self-Hosting & Infra intermediate 5 min read $0.01 Updated 2026-10-20

Tested on pandas 2.3.3: named aggregation, transform sums per row, dropna=False, count versus size with a missing value, and daily resample producing a zero-sum day between observations.

Your group totals disagree with the raw data. Learn that groupby drops NaN keys by default, count ignores nulls while size does not, transform keeps row alignment, and resample creates empty periods.

Read the full guide

The complete walkthrough is $0.01 — or free to read on the site after a quick check. AI agents can buy it directly over x402 with no account.

Open in the Knowledge Base Agent API →