Skip to content

Commit

Permalink
remove import failure
Browse files Browse the repository at this point in the history
  • Loading branch information
sinhrks committed Jan 21, 2017
1 parent de44877 commit 279fdf6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions doc/source/whatsnew/v0.20.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ Bug Fixes

- Bug in ``pd.read_msgpack()`` in which ``Series`` categoricals were being improperly processed (:issue:`14901`)
- Bug in ``Series.ffill()`` with mixed dtypes containing tz-aware datetimes. (:issue:`14956`)
- Bug in ``.replace()`` may result in incorrect dtypes. (:issue:`12747`)



Expand Down
4 changes: 2 additions & 2 deletions pandas/core/internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -3236,7 +3236,7 @@ def comp(s):
return _possibly_compare(values, getattr(s, 'asm8', s),
operator.eq)

def _cast(block, scalar):
def _cast_scalar(block, scalar):
dtype, val = _infer_dtype_from_scalar(scalar, pandas_dtype=True)
if not is_dtype_equal(block.dtype, dtype):
dtype = _find_common_type([block.dtype, dtype])
Expand Down Expand Up @@ -3268,7 +3268,7 @@ def _cast(block, scalar):
# particular block
m = masks[i][b.mgr_locs.indexer]
if m.any():
b, val = _cast(b, d)
b, val = _cast_scalar(b, d)
new_rb.extend(b.putmask(m, val, inplace=True))
else:
new_rb.append(b)
Expand Down
2 changes: 1 addition & 1 deletion pandas/types/cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
_ensure_int8, _ensure_int16,
_ensure_int32, _ensure_int64,
_NS_DTYPE, _TD_DTYPE, _INT64_DTYPE,
_DATELIKE_DTYPES, _POSSIBLY_CAST_DTYPES)
_POSSIBLY_CAST_DTYPES)
from .dtypes import ExtensionDtype, DatetimeTZDtype, PeriodDtype
from .generic import ABCDatetimeIndex, ABCPeriodIndex, ABCSeries
from .missing import isnull, notnull
Expand Down

0 comments on commit 279fdf6

Please sign in to comment.