Skip to content

Commit e0c6c7c

Browse files
added line to whatsnew v0.19.2 and test to test_missing.py in series folder
1 parent e4ba7e0 commit e0c6c7c

File tree

3 files changed

+22
-34
lines changed

3 files changed

+22
-34
lines changed

doc/source/whatsnew/v0.19.2.txt

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Other Enhancements
3838
Bug Fixes
3939
~~~~~~~~~
4040

41+
- Bug in fillna() in which timezone aware datetime64 values were incorrectly rounded (:issue:'14872')
4142
- Compat with ``dateutil==2.6.0``; segfault reported in the testing suite (:issue:`14621`)
4243
- Allow ``nanoseconds`` in ``Timestamp.replace`` as a kwarg (:issue:`14621`)
4344
- Bug in ``pd.read_csv`` in which aliasing was being done for ``na_values`` when passed in as a dictionary (:issue:`14203`)

pandas/tests/series/test_missing.py

+21
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717

1818
from .common import TestData
1919

20+
import datetime
21+
import pytz
22+
2023

2124
def _skip_if_no_pchip():
2225
try:
@@ -908,6 +911,24 @@ def test_interp_timedelta64(self):
908911
index=pd.to_timedelta([1, 2, 4]))
909912
assert_series_equal(result, expected)
910913

914+
# GH 14872
915+
def test_dtype_utc():
916+
917+
data = pd.Series([pd.NaT, pd.NaT,
918+
datetime.datetime(2016, 12, 12, 22, 24, 6, 100001,
919+
tzinfo=pytz.utc)])
920+
921+
filled = data.fillna(method='bfill')
922+
923+
expected = pd.Series([
924+
datetime.datetime(2016, 12, 12, 22, 24, 6,
925+
100001, tzinfo=pytz.utc),
926+
datetime.datetime(2016, 12, 12, 22, 24, 6,
927+
100001, tzinfo=pytz.utc),
928+
datetime.datetime(2016, 12, 12, 22, 24, 6,
929+
100001, tzinfo=pytz.utc)])
930+
931+
assert_series_equal(filled, expected)
911932

912933
if __name__ == '__main__':
913934
import nose

pandas/tests/test_dtype_utc.py

-34
This file was deleted.

0 commit comments

Comments
 (0)