BasisResearch / collab-creatures

Analyzing animal collaboration with Bayesian and causal inference.
4 stars 1 forks source link

fix future warning #62

Open rfl-urbaniak opened 4 months ago

rfl-urbaniak commented 4 months ago

warning in communicators_inference /home/rafal/s78projects/collaborative-intelligence/collab/foraging/toolkit/proximity.py:86: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.

rfl-urbaniak commented 1 month ago

2024-05-22 17:08:17,854 - traces done 2024-05-22 17:08:18,225 - visibility done /home/rafal/s78projects/collaborative-intelligence/collab/foraging/toolkit/proximity.py:86: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method. The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.

For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.

proximity[b][t]["proximity_standardized"].fillna(0, inplace=True)