Fixing Silent Data Loss When Using pandas groupby with NaN Values
pandas drops NaN keys from groupby results by default β silently, with no warning. If your aggregations are coming up short, NaN values in your grouping columns are likely the culprit. Here's how to detect and fix it.