-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Series.ffill() with mixed dtypes containing tz-aware datetimes f… #14960
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
Current coverage is 84.65% (diff: 100%)@@ master #14960 diff @@
==========================================
Files 144 144
Lines 51043 51043
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 43214 43213 -1
- Misses 7829 7830 +1
Partials 0 0
|
@@ -300,3 +300,4 @@ Bug Fixes | |||
- Bug in ``Series.unique()`` in which unsigned 64-bit integers were causing overflow (:issue:`14721`) | |||
- Require at least 0.23 version of cython to avoid problems with character encodings (:issue:`14699`) | |||
- Bug in converting object elements of array-like objects to unsigned 64-bit integers (:issue:`4471`) | |||
- Bug in Series.ffill() with mixed dtypes containing tz-aware datetimes. (:issue: `14956`) |
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.
no space after the (:issue:`14956`)
pls add a test in pandas.types.tests.test_inference for the inference check otherwise lgtm. |
20d96e0
to
4c6b9ba
Compare
Added some simple tests and corrected whitespace issue. Please let me know if you'd like some more extensive/different testing. |
@grutts lgtm. ping on green. |
4c6b9ba
to
8550ed1
Compare
@jreback all green. Had to make another commit to pass PEP8 |
thanks! note I had to add an option to the test_inference test to make it fail w/o the change. The importance of testing first before the fix. |
…ails. (GH14956)
Seems to work with all the datetime classes usually encountered, although 'tz' seems to be the idiom in the codebase (not sure why?). If both need to be supported I can replace
getattr(val, 'tzinfo', None)
withgetattr(val, 'tz', None) or getattr(val, 'tzinfo', None)
, thus also giving precedence to the former (if available).(breaking commit was 4de83d2)
git diff upstream/master | flake8 --diff