@@ -1178,7 +1178,7 @@ def handle_error(detail):
1178
1178
1179
1179
# technically a broadcast error in numpy can 'work' by returning a
1180
1180
# boolean False
1181
- if not isinstance (result , ( np .ndarray , PeriodIndex ) ):
1181
+ if not isinstance (result , np .ndarray ):
1182
1182
# differentiate between an invalid ndarray-ndarray comparison
1183
1183
# and an invalid type comparison
1184
1184
if isinstance (values , np .ndarray ) and is_list_like (other ):
@@ -1843,7 +1843,7 @@ def convert(self, *args, **kwargs):
1843
1843
raise NotImplementedError
1844
1844
by_item = True if 'by_item' not in kwargs else kwargs ['by_item' ]
1845
1845
1846
- new_inputs = ['coerce' , 'datetime' , 'numeric' , 'timedelta' , 'period' ]
1846
+ new_inputs = ['coerce' , 'datetime' , 'numeric' , 'timedelta' ]
1847
1847
new_style = False
1848
1848
for kw in new_inputs :
1849
1849
new_style |= kw in kwargs
@@ -2532,7 +2532,6 @@ def __init__(self, values, placement, ndim=2, **kwargs):
2532
2532
dtype = kwargs .pop ('dtype' , None )
2533
2533
if not isinstance (values , self ._holder ):
2534
2534
# dtype contains freq info
2535
- print (values , dtype )
2536
2535
values = self ._holder (values , dtype = dtype )
2537
2536
2538
2537
super (PeriodBlock , self ).__init__ (values , placement = placement ,
@@ -2563,19 +2562,6 @@ def to_dense(self):
2563
2562
# called from Series.get_values()
2564
2563
return self .values .asobject
2565
2564
2566
- # def _try_fill(self, value):
2567
- # """ if we are a NaT, return the actual fill value """
2568
- # if value is tslib.NaT or np.array(isnull(value)).all():
2569
- # value = tslib.iNaT
2570
- # elif isinstance(value, Period):
2571
- # # Period Nat can be handled here
2572
- # value = value.ordinal
2573
- # elif is_integer(value):
2574
- # # regarded as ordinal
2575
- # pass
2576
- #
2577
- # return value
2578
-
2579
2565
def _try_coerce_args (self , values , other ):
2580
2566
"""
2581
2567
Coerce values and other to dtype 'i8'. NaN and NaT convert to
0 commit comments