8787 ABCSeries ,
8888)
8989from pandas .core .dtypes .inference import is_list_like
90- from pandas .core .dtypes .missing import is_valid_nat_for_dtype , isna , notna
90+ from pandas .core .dtypes .missing import is_valid_na_for_dtype , isna , notna
9191
9292if TYPE_CHECKING :
9393 from pandas import Series
@@ -159,7 +159,7 @@ def maybe_unbox_datetimelike(value: Scalar, dtype: DtypeObj) -> Scalar:
159159 -----
160160 Caller is responsible for checking dtype.kind in ["m", "M"]
161161 """
162- if is_valid_nat_for_dtype (value , dtype ):
162+ if is_valid_na_for_dtype (value , dtype ):
163163 # GH#36541: can't fill array directly with pd.NaT
164164 # > np.empty(10, dtype="datetime64[64]").fill(pd.NaT)
165165 # ValueError: cannot convert float NaN to integer
@@ -535,7 +535,7 @@ def maybe_promote(dtype, fill_value=np.nan):
535535 dtype = np .dtype (np .object_ )
536536 elif is_integer (fill_value ) or (is_float (fill_value ) and not isna (fill_value )):
537537 dtype = np .dtype (np .object_ )
538- elif is_valid_nat_for_dtype (fill_value , dtype ):
538+ elif is_valid_na_for_dtype (fill_value , dtype ):
539539 # e.g. pd.NA, which is not accepted by Timestamp constructor
540540 fill_value = np .datetime64 ("NaT" , "ns" )
541541 else :
@@ -551,7 +551,7 @@ def maybe_promote(dtype, fill_value=np.nan):
551551 ):
552552 # TODO: What about str that can be a timedelta?
553553 dtype = np .dtype (np .object_ )
554- elif is_valid_nat_for_dtype (fill_value , dtype ):
554+ elif is_valid_na_for_dtype (fill_value , dtype ):
555555 # e.g pd.NA, which is not accepted by the Timedelta constructor
556556 fill_value = np .timedelta64 ("NaT" , "ns" )
557557 else :
0 commit comments