-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: fix nested dict replace #6365
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
Conversation
see u r hacking the biggest hack in internals, putmask |
yes this is definitely a hack. |
internals is kind of fun .... always have to clear out my weekend when a bug involves internals.py 😄 |
fyi |
I avoided yeh... |
|
what do you mean? |
It's just really, really large ... |
hahah so true! next project...you can effectively replace |
@jreback What do u think about this? I'll run a vbench to make sure this doesn't cause a hit. |
sure....looks fine otherwise.....not even sure how often that path is actually hit (can you put a case that hits it up?) |
Nested dicts hit it if they contain keys that aren't in the frame/series df = DataFrame({'col': range(1, 5)})
df.replace({'col': {-1: 'a', 1: 'b', 2: 'c'}}) |
ok...then prob ok....not hit a lot...but do a perf check anyhow |
Perf looks good:
|
Random network failure unrelated to this https://travis-ci.org/cpcloud/pandas/jobs/18993144 merging |
closes #6342