This commit is contained in:
Rodolfo Fernandez 2016-12-17 10:08:57 -08:00
parent b7358de23b
commit ba83fc85ab
1 changed files with 24 additions and 0 deletions

24
test_dtype_utc.py Normal file
View File

@ -0,0 +1,24 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Dec 17 09:34:47 2016
@author: rodolfoxps
"""
import pandas as pd
import datetime, pytz
from pandas.util.testing import assert_frame_equal
def test_dtype_utc(self):
data=pd.Series( [pd.NaT, pd.NaT, datetime.datetime(2016, 12, 12, 22, 24, 6, 100001, tzinfo=pytz.utc) ] )
filled=data.fillna(method='bfill')
expected=pd.Series([datetime.datetime(2016, 12, 12, 22, 24, 6, 100001, tzinfo=pytz.utc) ,
datetime.datetime(2016, 12, 12, 22, 24, 6, 100001, tzinfo=pytz.utc) ,
datetime.datetime(2016, 12, 12, 22, 24, 6, 100001, tzinfo=pytz.utc) ])
assert_frame_equal(filled, expected)