Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COMPAT: raise SettingWithCopy in even more situations when a view is at hand #7950

Merged
merged 2 commits into from
Aug 11, 2014

Conversation

jreback
Copy link
Contributor

@jreback jreback commented Aug 6, 2014

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).

@jreback jreback added this to the 0.15.0 milestone Aug 6, 2014
return getattr(self, '_cacher', None) is not None

def _get_cacher(self):
""" return my cahcer or None """
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: "cacher"

jreback added a commit that referenced this pull request Aug 11, 2014
COMPAT: raise SettingWithCopy in even more situations when a view is at hand
@jreback jreback merged commit f400014 into pandas-dev:master Aug 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design Error Reporting Incorrect or improved errors from pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants