1
- from typing import Callable
1
+ from typing import Union
2
2
3
3
import numpy as np
4
+ import pandas as pd
5
+
6
+ from pandas ._typing import (
7
+ ArrayLike ,
8
+ DtypeObj ,
9
+ npt ,
10
+ )
4
11
5
12
from pandas .core .dtypes .inference import (
6
13
is_array_like as is_array_like ,
@@ -21,37 +28,28 @@ from pandas.core.dtypes.inference import (
21
28
is_scalar as is_scalar ,
22
29
)
23
30
24
- def classes (* klasses ) -> Callable : ...
25
- def classes_and_not_datetimelike (* klasses ) -> Callable : ...
26
- def is_object_dtype (arr_or_dtype ) -> bool : ...
27
- def is_sparse (arr ) -> bool : ...
28
- def is_scipy_sparse (arr ) -> bool : ...
29
- def is_categorical (arr ) -> bool : ...
30
- def is_datetime64_dtype (arr_or_dtype ) -> bool : ...
31
- def is_datetime64tz_dtype (arr_or_dtype ) -> bool : ...
32
- def is_timedelta64_dtype (arr_or_dtype ) -> bool : ...
33
- def is_period_dtype (arr_or_dtype ) -> bool : ...
34
- def is_interval_dtype (arr_or_dtype ) -> bool : ...
35
- def is_categorical_dtype (arr_or_dtype ) -> bool : ...
36
- def is_string_dtype (arr_or_dtype ) -> bool : ...
31
+ _ArrayOrDtype = Union [ArrayLike , npt .DTypeLike , pd .Series , pd .DataFrame ]
32
+
33
+ def is_object_dtype (arr_or_dtype : _ArrayOrDtype ) -> bool : ...
34
+ def is_sparse (arr : ArrayLike | pd .Series | pd .DataFrame ) -> bool : ...
35
+ def is_datetime64_dtype (arr_or_dtype : _ArrayOrDtype ) -> bool : ...
36
+ def is_datetime64tz_dtype (arr_or_dtype : _ArrayOrDtype ) -> bool : ...
37
+ def is_timedelta64_dtype (arr_or_dtype : _ArrayOrDtype ) -> bool : ...
38
+ def is_period_dtype (arr_or_dtype : _ArrayOrDtype ) -> bool : ...
37
39
def is_dtype_equal (source , target ) -> bool : ...
38
- def is_any_int_dtype (arr_or_dtype ) -> bool : ...
39
- def is_integer_dtype (arr_or_dtype ) -> bool : ...
40
- def is_signed_integer_dtype (arr_or_dtype ) -> bool : ...
41
- def is_unsigned_integer_dtype (arr_or_dtype ) -> bool : ...
42
- def is_int64_dtype (arr_or_dtype ) -> bool : ...
43
- def is_datetime64_any_dtype (arr_or_dtype ) -> bool : ...
44
- def is_datetime64_ns_dtype (arr_or_dtype ) -> bool : ...
45
- def is_timedelta64_ns_dtype (arr_or_dtype ) -> bool : ...
46
- def is_datetime_or_timedelta_dtype (arr_or_dtype ) -> bool : ...
47
- def is_numeric_v_string_like (a , b ): ...
48
- def is_datetimelike_v_numeric (a , b ): ...
49
- def needs_i8_conversion (arr_or_dtype ) -> bool : ...
50
- def is_numeric_dtype (arr_or_dtype ) -> bool : ...
51
- def is_float_dtype (arr_or_dtype ) -> bool : ...
52
- def is_bool_dtype (arr_or_dtype ) -> bool : ...
53
- def is_extension_type (arr ) -> bool : ...
54
- def is_extension_array_dtype (arr_or_dtype ) -> bool : ...
55
- def is_complex_dtype (arr_or_dtype ) -> bool : ...
56
- def infer_dtype_from_object (dtype ): ...
57
- def pandas_dtype (dtype ): ...
40
+ def is_interval_dtype (arr_or_dtype : _ArrayOrDtype ) -> bool : ...
41
+ def is_categorical_dtype (arr_or_dtype : _ArrayOrDtype ) -> bool : ...
42
+ def is_string_dtype (arr_or_dtype : _ArrayOrDtype ) -> bool : ...
43
+ def is_integer_dtype (arr_or_dtype : _ArrayOrDtype ) -> bool : ...
44
+ def is_signed_integer_dtype (arr_or_dtype : _ArrayOrDtype ) -> bool : ...
45
+ def is_unsigned_integer_dtype (arr_or_dtype : _ArrayOrDtype ) -> bool : ...
46
+ def is_int64_dtype (arr_or_dtype : _ArrayOrDtype ) -> bool : ...
47
+ def is_datetime64_any_dtype (arr_or_dtype : _ArrayOrDtype ) -> bool : ...
48
+ def is_datetime64_ns_dtype (arr_or_dtype : _ArrayOrDtype ) -> bool : ...
49
+ def is_timedelta64_ns_dtype (arr_or_dtype : _ArrayOrDtype ) -> bool : ...
50
+ def is_numeric_dtype (arr_or_dtype : _ArrayOrDtype ) -> bool : ...
51
+ def is_float_dtype (arr_or_dtype : _ArrayOrDtype ) -> bool : ...
52
+ def is_bool_dtype (arr_or_dtype : _ArrayOrDtype ) -> bool : ...
53
+ def is_extension_array_dtype (arr_or_dtype : _ArrayOrDtype ) -> bool : ...
54
+ def is_complex_dtype (arr_or_dtype : _ArrayOrDtype ) -> bool : ...
55
+ def pandas_dtype (dtype : object ) -> DtypeObj : ...
0 commit comments