8000 TYP: core/dtypes/cast.py by arw2019 · Pull Request #37024 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

TYP: core/dtypes/cast.py #37024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Oct 14, 2020
Prev Previous commit
Next Next commit
more type hints
  • Loading branch information
arw2019 committed Oct 13, 2020
commit 8da843d1bda5723075b0cd07fb297ce7ace1d4ae
5 changes: 2 additions & 3 deletions pandas/core/dtypes/cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,10 @@
notna,
)

from pandas.core.indexes.datetimes import DatetimeIndex

if TYPE_CHECKING:
from pandas import Series
from pandas.core.arrays import ExtensionArray
from pandas.core.indexes.datetimes import DatetimeIndex

_int8_max = np.iinfo(np.int8).max
_int16_max = np.iinfo(np.int16).max
Expand Down Expand Up @@ -1087,7 +1086,7 @@ def astype_nansafe(

def maybe_convert_objects(
values: np.ndarray, convert_numeric: bool = True
) -> Union[np.ndarray, DatetimeIndex]:
) -> Union[np.ndarray, "DatetimeIndex"]:
"""
If we have an object dtype array, try to coerce dates and/or numbers.

Expand Down
0