-
- Notifications
You must be signed in to change notification settings - Fork 19.4k
BUG: Timestamp.replace chaining not compat with datetime.replace #17356
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
| @sscherfke : This look pretty good (test-wise) save for a minor linting issue, which you can see here: https://travis-ci.org/pandas-dev/pandas/jobs/269100110#L1809 |
Codecov Report
@@ Coverage Diff @@ ## master #17356 +/- ## ========================================== - Coverage 91.03% 91.02% -0.02% ========================================== Files 162 162 Lines 49567 49567 ========================================== - Hits 45125 45116 -9 - Misses 4442 4451 +9
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@ ## master #17356 +/- ## ========================================== - Coverage 91.03% 91.02% -0.02% ========================================== Files 162 162 Lines 49567 49567 ========================================== - Hits 45125 45116 -9 - Misses 4442 4451 +9
Continue to review full report at Codecov.
|
| My bad. Fixed it. |
| Can this PR please be merge? This function computes wrong results since more than half a year by now! |
| From #16110 (comment)
Can you try that? |
| I gave this branch + changing from datetime import datetime import pytz from pandas import Timestamp import cProfile import pstats dt = datetime(2016, 3, 27, 1) tzinfo = pytz.timezone('CET').localize(dt, is_dst=False).tzinfo result_dt = dt.replace(tzinfo=tzinfo) ts = Timestamp(dt) code = ''' for _ in range(10000): ts.replace(tzinfo=tzinfo) ''' cProfile.runctx(code, globals(), locals(), "Profile.prof") s = pstats.Stats("Profile.prof") s.strip_dirs().sort_stats("time").print_stats()Master: PR: I'm out of time now, but some quick thoughts:
|
| replaced by #17507 |
git diff upstream/master -u -- "*.py" | flake8 --diffThis is a clean version of #16110 and the last thing I’m going to do with this issue.