File tree 2 files changed +1
-10
lines changed
2 files changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -39,8 +39,6 @@ def mask_missing(arr, values_to_mask):
39
39
# numpy elementwise comparison warning
40
40
if is_numeric_v_string_like (arr , x ):
41
41
mask = False
42
- # elif is_object_dtype(arr):
43
- # mask = lib.scalar_compare(arr, x, operator.eq)
44
42
else :
45
43
mask = arr == x
46
44
@@ -53,8 +51,6 @@ def mask_missing(arr, values_to_mask):
53
51
# numpy elementwise comparison warning
54
52
if is_numeric_v_string_like (arr , x ):
55
53
mask |= False
56
- # elif is_object_dtype(arr):
57
- # mask |= lib.scalar_compare(arr, x, operator.eq)
58
54
else :
59
55
mask |= arr == x
60
56
Original file line number Diff line number Diff line change @@ -350,9 +350,6 @@ def _infer_dtype_from_scalar(val, pandas_dtype=False):
350
350
else :
351
351
if pandas_dtype :
352
352
dtype = DatetimeTZDtype (unit = 'ns' , tz = val .tz )
353
- # ToDo: This localization is not needed if
354
- # DatetimeTZBlock doesn't localize internal values
355
- val = val .tz_localize (None )
356
353
else :
357
354
# return datetimetz as object
358
355
return np .object_ , val
@@ -381,9 +378,7 @@ def _infer_dtype_from_scalar(val, pandas_dtype=False):
381
378
dtype = np .complex_
382
379
383
380
elif pandas_dtype :
384
- # to do use util
385
- from pandas .tseries .period import Period
386
- if isinstance (val , Period ):
381
+ if lib .is_period (val ):
387
382
dtype = PeriodDtype (freq = val .freq )
388
383
val = val .ordinal
389
384
You can’t perform that action at this time.
0 commit comments