-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
REGR: fix eval with inplace=True to correctly update column values inplace #47550
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
Changes from 7 commits
90e2955
39987cf
517c928
c0d8502
7d2c398
ba32bd5
cead80f
e52895e
bdf5e00
e3e34cc
541263c
8fdc63d
283c20a
9615c0e
e74b049
8ed21d5
2ffb81c
76327eb
32afe96
9959800
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -384,7 +384,10 @@ def eval( | |
try: | ||
with warnings.catch_warnings(record=True): | ||
# TODO: Filter the warnings we actually care about here. | ||
target[assigner] = ret | ||
if hasattr(target, "loc"): | ||
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. This is not ideal. What could target be here? Dict, series, DataFrame, something else? 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. Nope, basically these 3. Used ´isinstance(target, (DataFrame, Series))` instead |
||
target.loc[:, assigner] = ret | ||
else: | ||
target[assigner] = ret | ||
except (TypeError, IndexError) as err: | ||
raise ValueError("Cannot assign expression output to target") from err | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.