@@ -75,6 +75,7 @@ from pandas._libs.tslibs.nattype cimport (
75
75
from pandas._libs.tslibs.conversion cimport convert_to_tsobject
76
76
from pandas._libs.tslibs.timedeltas cimport convert_to_timedelta64
77
77
from pandas._libs.tslibs.timezones cimport get_timezone, tz_compare
78
+ from pandas._libs.tslibs.period cimport is_period_object
78
79
79
80
from pandas._libs.missing cimport (
80
81
checknull,
@@ -185,7 +186,7 @@ def is_scalar(val: object) -> bool:
185
186
186
187
# Note: PyNumber_Check check includes Decimal, Fraction, numbers.Number
187
188
return (PyNumber_Check(val)
188
- or util. is_period_object(val)
189
+ or is_period_object(val)
189
190
or is_interval(val)
190
191
or util.is_offset_object(val))
191
192
@@ -942,7 +943,7 @@ def is_period(val: object) -> bool:
942
943
-------
943
944
bool
944
945
"""
945
- return util. is_period_object(val )
946
+ return is_period_object(val )
946
947
947
948
948
949
def is_list_like(obj: object , allow_sets: bool = True ) -> bool:
@@ -1417,7 +1418,7 @@ def infer_dtype(value: object, skipna: bool = True) -> str:
1417
1418
if is_bytes_array(values, skipna = skipna):
1418
1419
return " bytes"
1419
1420
1420
- elif util. is_period_object(val):
1421
+ elif is_period_object(val):
1421
1422
if is_period_array(values):
1422
1423
return " period"
1423
1424
@@ -1849,7 +1850,7 @@ cpdef bint is_time_array(ndarray values, bint skipna=False):
1849
1850
1850
1851
cdef class PeriodValidator(TemporalValidator):
1851
1852
cdef inline bint is_value_typed(self , object value) except - 1 :
1852
- return util. is_period_object(value)
1853
+ return is_period_object(value)
1853
1854
1854
1855
cdef inline bint is_valid_null(self , object value) except - 1 :
1855
1856
return checknull_with_nat(value)
0 commit comments