@@ -1192,7 +1192,7 @@ def handle_error(detail):
1192
1192
1193
1193
# technically a broadcast error in numpy can 'work' by returning a
1194
1194
# boolean False
1195
- if not isinstance (result , ( np .ndarray , PeriodIndex ) ):
1195
+ if not isinstance (result , np .ndarray ):
1196
1196
# differentiate between an invalid ndarray-ndarray comparison
1197
1197
# and an invalid type comparison
1198
1198
if isinstance (values , np .ndarray ) and is_list_like (other ):
@@ -1860,7 +1860,7 @@ def convert(self, *args, **kwargs):
1860
1860
raise NotImplementedError
1861
1861
by_item = True if 'by_item' not in kwargs else kwargs ['by_item' ]
1862
1862
1863
- new_inputs = ['coerce' , 'datetime' , 'numeric' , 'timedelta' , 'period' ]
1863
+ new_inputs = ['coerce' , 'datetime' , 'numeric' , 'timedelta' ]
1864
1864
new_style = False
1865
1865
for kw in new_inputs :
1866
1866
new_style |= kw in kwargs
@@ -2552,7 +2552,6 @@ def __init__(self, values, placement, ndim=2, **kwargs):
2552
2552
dtype = kwargs .pop ('dtype' , None )
2553
2553
if not isinstance (values , self ._holder ):
2554
2554
# dtype contains freq info
2555
- print (values , dtype )
2556
2555
values = self ._holder (values , dtype = dtype )
2557
2556
2558
2557
super (PeriodBlock , self ).__init__ (values , placement = placement ,
@@ -2583,19 +2582,6 @@ def to_dense(self):
2583
2582
# called from Series.get_values()
2584
2583
return self .values .asobject
2585
2584
2586
- # def _try_fill(self, value):
2587
- # """ if we are a NaT, return the actual fill value """
2588
- # if value is tslib.NaT or np.array(isnull(value)).all():
2589
- # value = tslib.iNaT
2590
- # elif isinstance(value, Period):
2591
- # # Period Nat can be handled here
2592
- # value = value.ordinal
2593
- # elif is_integer(value):
2594
- # # regarded as ordinal
2595
- # pass
2596
- #
2597
- # return value
2598
-
2599
2585
def _try_coerce_args (self , values , other ):
2600
2586
"""
2601
2587
Coerce values and other to dtype 'i8'. NaN and NaT convert to
0 commit comments