We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fdc8ad0 commit ca626c5Copy full SHA for ca626c5
pandas/core/dtypes/cast.py
@@ -80,11 +80,10 @@
80
notna,
81
)
82
83
-from pandas.core.indexes.datetimes import DatetimeIndex
84
-
85
if TYPE_CHECKING:
86
from pandas import Series
87
from pandas.core.arrays import ExtensionArray
+ from pandas.core.indexes.datetimes import DatetimeIndex
88
89
_int8_max = np.iinfo(np.int8).max
90
_int16_max = np.iinfo(np.int16).max
@@ -1084,7 +1083,7 @@ def astype_nansafe(
1084
1083
1085
def maybe_convert_objects(
1086
values: np.ndarray, convert_numeric: bool = True
1087
-) -> Union[np.ndarray, DatetimeIndex]:
+) -> Union[np.ndarray, "DatetimeIndex"]:
1088
"""
1089
If we have an object dtype array, try to coerce dates and/or numbers.
1090
0 commit comments