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
7.04k stars 924 forks source link

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

Closed dw-610 closed 5 months ago

dw-610 commented 5 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()

dw-610 commented 5 months ago

Thanks for the feedback @amit-sharma

The issue should be resolved now.

amit-sharma commented 5 months ago

Thanks! @all-contributors please add @dw-610 for code

allcontributors[bot] commented 5 months ago

@amit-sharma

I've put up a pull request to add @dw-610! :tada: