# FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas.

- **ID:** `python/pandas-groupby-observed-warning`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

groupby on a Categorical column with observed=False (default in older pandas) produces cartesian product of categories, including empty groups.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   df.groupby('cat', observed=True).agg('sum')
   ```
2. **** (85% success)
   ```
   pd.set_option('mode.copy_on_write', True) plus explicit observed=True
   ```

## Dead Ends

- **** — Same warning, results include empty categories (85% fail)
- **** — Loses categorical ordering (60% fail)
