Skip to content

Commit

Permalink
Remove unnecessary codes
Browse files Browse the repository at this point in the history
  • Loading branch information
sinhrks committed Jan 21, 2017
1 parent 6934c19 commit 806ebee
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
4 changes: 0 additions & 4 deletions pandas/core/missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ def mask_missing(arr, values_to_mask):
# numpy elementwise comparison warning
if is_numeric_v_string_like(arr, x):
mask = False
# elif is_object_dtype(arr):
# mask = lib.scalar_compare(arr, x, operator.eq)
else:
mask = arr == x

Expand All @@ -53,8 +51,6 @@ def mask_missing(arr, values_to_mask):
# numpy elementwise comparison warning
if is_numeric_v_string_like(arr, x):
mask |= False
# elif is_object_dtype(arr):
# mask |= lib.scalar_compare(arr, x, operator.eq)
else:
mask |= arr == x

Expand Down
7 changes: 1 addition & 6 deletions pandas/types/cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,6 @@ def _infer_dtype_from_scalar(val, pandas_dtype=False):
else:
if pandas_dtype:
dtype = DatetimeTZDtype(unit='ns', tz=val.tz)
# ToDo: This localization is not needed if
# DatetimeTZBlock doesn't localize internal values
val = val.tz_localize(None)
else:
# return datetimetz as object
return np.object_, val
Expand Down Expand Up @@ -381,9 +378,7 @@ def _infer_dtype_from_scalar(val, pandas_dtype=False):
dtype = np.complex_

elif pandas_dtype:
# to do use util
from pandas.tseries.period import Period
if isinstance(val, Period):
if lib.is_period(val):
dtype = PeriodDtype(freq=val.freq)
val = val.ordinal

Expand Down

0 comments on commit 806ebee

Please sign in to comment.