py-why / dowhy

DoWhy is a Python library for causal inference that supports explicit modeling and testing of causal assumptions. DoWhy is based on a unified language for causal inference, combining causal graphical models and potential outcomes frameworks.
https://www.pywhy.org/dowhy
MIT License
6.88k stars 916 forks source link

Fix pandas FutureWarnings in calls to .groupby() #1163

Closed dw-610 closed 2 months ago

dw-610 commented 2 months ago

Problem

Currently, with pandas version 2.2.2, calls to .groupby() raise the warning below:

FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.

Solution

To retain current behavior and silence this warning, observed=False was added to all calls to .groupby()