COMPAT: raise SettingWithCopy in even more situations when a view is at hand by jreback · Pull Request #7950 · pandas-dev/pandas (original) (raw)

This will detect even more situations where chained assignment is being used.

FYI technically there are 2 situations where the same error is raised: 1) setting on a copy, 2) chained assignment on a view. Both are really similar and result in usually the same issue. An assignment that doesn't appear to assign anything.

This detected a number of tests that were incorrectly using chaining in the pandas test suite as well (fixed below).