#NEWLINE# def test_dateparser_resolution_if_not_ns( self ) : #NEWLINE# #INDENT# data = 'date,time,prn,rxstatus\n2013-11-03,19:00:00,126,00E80000\n2013-11-03,19:00:00,23,00E80000\n2013-11-03,19:00:00,13,00E80000\n' #NEWLINE# def date_parser( date , time ) : #NEWLINE# #INDENT# datetime = np_array_datetime64_compat ( ( ( ( date + 'T' ) + time ) + 'Z' ) , dtype = 'datetime64[s]' ) #NEWLINE# return datetime #NEWLINE# #UNINDENT# df = read_csv ( StringIO ( data ) , date_parser = date_parser , parse_dates = { #NEWLINE# #INDENT# 'datetime' : [ 'date' , 'time' ] , #NEWLINE# #UNINDENT# } , index_col = [ 'datetime' , 'prn' ] ) #NEWLINE# datetimes = np_array_datetime64_compat ( ( [ '2013-11-03T19:00:00Z' ] * 3 ) , dtype = 'datetime64[s]' ) #NEWLINE# df_correct = DataFrame ( data = { #NEWLINE# #INDENT# 'rxstatus' : ( [ '00E80000' ] * 3 ) , #NEWLINE# #UNINDENT# } , index = MultiIndex . from_tuples ( [ ( datetimes [ 0 ] , 126 ) , ( datetimes [ 1 ] , 23 ) , ( datetimes [ 2 ] , 13 ) ] , names = [ 'datetime' , 'prn' ] ) ) #NEWLINE# assert_frame_equal ( df , df_correct )