You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
are modifying the dataframe in-place by setting its index. since this happens inside a class method, it might be unexpected for whoever passed the dataframe, especially if they rely on its original structure later. in my case, i iterate over the same dataframe later on, but after calling the method (second print), the index has been altered, which breaks assumptions about its structure.
to avoid side effects, we probably want to work on a copy instead (or at least document that this changes the input). otherwise, it can silently break downstream code.