chained assignment issue #420
Closed
HugoGagnon
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
There is a slight modification to perform in pairwise.py
Error:
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.
stats["Time"].fillna("-", inplace=True)
line 592 in code:
Rename Time columns
Should most likely become:
if contrast in ["multiple_within", "multiple_between", "within_between"] and interaction:
stats["Time"]= stats["Time"].fillna("-")
stats.rename(columns={"Time": factors[0]}, inplace=True)
Beta Was this translation helpful? Give feedback.
All reactions