Skip to content

Commit f9154e8

Browse files
committed
remove unnecessary comments
1 parent 279fdf6 commit f9154e8

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

pandas/core/missing.py

-4
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ def mask_missing(arr, values_to_mask):
3939
# numpy elementwise comparison warning
4040
if is_numeric_v_string_like(arr, x):
4141
mask = False
42-
# elif is_object_dtype(arr):
43-
# mask = lib.scalar_compare(arr, x, operator.eq)
4442
else:
4543
mask = arr == x
4644

@@ -53,8 +51,6 @@ def mask_missing(arr, values_to_mask):
5351
# numpy elementwise comparison warning
5452
if is_numeric_v_string_like(arr, x):
5553
mask |= False
56-
# elif is_object_dtype(arr):
57-
# mask |= lib.scalar_compare(arr, x, operator.eq)
5854
else:
5955
mask |= arr == x
6056

pandas/types/cast.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,6 @@ def _infer_dtype_from_scalar(val, pandas_dtype=False):
350350
else:
351351
if pandas_dtype:
352352
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)
356353
else:
357354
# return datetimetz as object
358355
return np.object_, val
@@ -381,9 +378,7 @@ def _infer_dtype_from_scalar(val, pandas_dtype=False):
381378
dtype = np.complex_
382379

383380
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):
387382
dtype = PeriodDtype(freq=val.freq)
388383
val = val.ordinal
389384

0 commit comments

Comments
 (0)