File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ pandas 0.8.2
64
64
- Fix field access with UTC->local conversion on unsorted arrays (#1756)
65
65
- Fix isnull handling of array-like (list) inputs (#1755)
66
66
- Fix regression in handling of Series in Series constructor (#1671)
67
- - Fix another NumPy datetime64 concatenate bug in DataFrame.append (#1681)
67
+ - Fix comparison of Int64Index with DatetimeIndex (#1681)
68
68
- Fix min_periods handling in new rolling_max/min at array start (#1695)
69
69
- Fix errors with how='median' and generic NumPy resampling in some cases
70
70
caused by SeriesBinGrouper (#1648, #1688)
Original file line number Diff line number Diff line change @@ -1211,7 +1211,11 @@ def equals(self, other):
1211
1211
# if not isinstance(other, Int64Index):
1212
1212
# return False
1213
1213
1214
- return np .array_equal (self , other )
1214
+ try :
1215
+ return np .array_equal (self , other )
1216
+ except TypeError :
1217
+ # e.g. fails in numpy 1.6 with DatetimeIndex #1681
1218
+ return False
1215
1219
1216
1220
def _wrap_joined_index (self , joined , other ):
1217
1221
name = self .name if self .name == other .name else None
Original file line number Diff line number Diff line change @@ -1067,6 +1067,14 @@ def test_frame_dict_constructor_datetime64_1680(self):
1067
1067
DataFrame ({'a' : 'foo' , 'b' : s }, index = dr )
1068
1068
DataFrame ({'a' : 'foo' , 'b' : s .values }, index = dr )
1069
1069
1070
+ def test_frame_datetime64_mixed_index_ctor_1681 (self ):
1071
+ dr = date_range ('2011/1/1' , '2012/1/1' , freq = 'W-FRI' )
1072
+ ts = Series (dr )
1073
+
1074
+ # it works!
1075
+ d = DataFrame ({'A' : 'foo' , 'B' : ts }, index = dr )
1076
+ self .assert_ (d ['B' ].isnull ().all ())
1077
+
1070
1078
def _simple_ts (start , end , freq = 'D' ):
1071
1079
rng = date_range (start , end , freq = freq )
1072
1080
return Series (np .random .randn (len (rng )), index = rng )
You can’t perform that action at this time.
0 commit comments