-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: item_cache invalidation in get_numeric_data #35882
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
4c5eddd
REF: remove unnecesary try/except
jbrockmendel c632c9f
Merge branch 'master' of https://github.com/pandas-dev/pandas into re…
jbrockmendel 9e64be3
Merge branch 'master' of https://github.com/pandas-dev/pandas into re…
jbrockmendel 42649fb
TST: add test for agg on ordered categorical cols (#35630)
mathurk1 47121dd
TST: resample does not yield empty groups (#10603) (#35799)
tkmz-n 1decb3e
revert accidental rebase
jbrockmendel 57c5dd3
Merge branch 'master' of https://github.com/pandas-dev/pandas into ma…
jbrockmendel a358463
Merge branch 'master' of https://github.com/pandas-dev/pandas into ma…
jbrockmendel ffa7ad7
Merge branch 'master' of https://github.com/pandas-dev/pandas into ma…
jbrockmendel e5e98d4
Merge branch 'master' of https://github.com/pandas-dev/pandas into ma…
jbrockmendel 408db5a
Merge branch 'master' of https://github.com/pandas-dev/pandas into ma…
jbrockmendel 0ab1821
BUG: item_cache invalidation in get_numeric_data
jbrockmendel 355800f
Merge branch 'master' of https://github.com/pandas-dev/pandas into bu…
jbrockmendel 71bba9c
Merge branch 'master' of https://github.com/pandas-dev/pandas into bu…
jbrockmendel 58d64d7
Merge branch 'master' of https://github.com/pandas-dev/pandas into bu…
jbrockmendel 505b4bb
Merge branch 'master' of https://github.com/pandas-dev/pandas into bu…
jbrockmendel 3778d1f
whatsnew
jbrockmendel f31f115
dummy commit to force Travis
jbrockmendel aeefef3
Merge branch 'master' of https://github.com/pandas-dev/pandas into bu…
jbrockmendel ba4fc44
Merge branch 'master' of https://github.com/pandas-dev/pandas into bu…
jbrockmendel 9dd4eba
Merge branch 'master' of https://github.com/pandas-dev/pandas into bu…
jbrockmendel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -191,6 +191,23 @@ def test_corr_nullable_integer(self, nullable_column, other_column, method): | |
expected = pd.DataFrame(np.ones((2, 2)), columns=["a", "b"], index=["a", "b"]) | ||
tm.assert_frame_equal(result, expected) | ||
|
||
def test_corr_item_cache(self): | ||
# Check that corr does not lead to incorrect entries in item_cache | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there an open issue for this? If not can you add a whatsnew? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. whatsnew added |
||
|
||
df = pd.DataFrame({"A": range(10)}) | ||
df["B"] = range(10)[::-1] | ||
|
||
ser = df["A"] # populate item_cache | ||
assert len(df._mgr.blocks) == 2 | ||
|
||
_ = df.corr() | ||
|
||
# Check that the corr didnt break link between ser and df | ||
ser.values[0] = 99 | ||
assert df.loc[0, "A"] == 99 | ||
assert df["A"] is ser | ||
assert df.values[0, 0] == 99 | ||
|
||
|
||
class TestDataFrameCorrWith: | ||
def test_corrwith(self, datetime_frame): | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you are removing this then get_bool_data right above looks suspicious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i agree. thats part of the _reduce trouble we discussed this afternoon. #34918 removes that usage.