3
3
from typing import NoReturn , Sequence , TYPE_CHECKING
4
4
5
5
if TYPE_CHECKING :
6
- from ._types import Scalar , DType
6
+ from ._types import Scalar
7
+ from . import DType
7
8
8
9
9
10
__all__ = ['Column' ]
@@ -52,7 +53,7 @@ def get_rows(self, indices: Column[int]) -> Column:
52
53
"""
53
54
...
54
55
55
- def get_value (self , row_number : int ) -> DType :
56
+ def get_value (self , row_number : int ) -> Scalar :
56
57
"""
57
58
Select the value at a row number, similar to `ndarray.__getitem__(<int>)`.
58
59
@@ -63,7 +64,7 @@ def get_value(self, row_number: int) -> DType:
63
64
64
65
Returns
65
66
-------
66
- dtype
67
+ Scalar
67
68
Depends on the dtype of the Column, and may vary
68
69
across implementations.
69
70
"""
@@ -369,56 +370,56 @@ def all(self, *, skip_nulls: bool = True) -> bool:
369
370
If column is not boolean.
370
371
"""
371
372
372
- def min (self , * , skip_nulls : bool = True ) -> DType :
373
+ def min (self , * , skip_nulls : bool = True ) -> Scalar :
373
374
"""
374
375
Reduction returns a scalar. Any data type that supports comparisons
375
376
must be supported. The returned value has the same dtype as the column.
376
377
"""
377
378
378
- def max (self , * , skip_nulls : bool = True ) -> DType :
379
+ def max (self , * , skip_nulls : bool = True ) -> Scalar :
379
380
"""
380
381
Reduction returns a scalar. Any data type that supports comparisons
381
382
must be supported. The returned value has the same dtype as the column.
382
383
"""
383
384
384
- def sum (self , * , skip_nulls : bool = True ) -> DType :
385
+ def sum (self , * , skip_nulls : bool = True ) -> Scalar :
385
386
"""
386
387
Reduction returns a scalar. Must be supported for numerical and
387
388
datetime data types. The returned value has the same dtype as the
388
389
column.
389
390
"""
390
391
391
- def prod (self , * , skip_nulls : bool = True ) -> DType :
392
+ def prod (self , * , skip_nulls : bool = True ) -> Scalar :
392
393
"""
393
394
Reduction returns a scalar. Must be supported for numerical data types.
394
395
The returned value has the same dtype as the column.
395
396
"""
396
397
397
- def median (self , * , skip_nulls : bool = True ) -> DType :
398
+ def median (self , * , skip_nulls : bool = True ) -> Scalar :
398
399
"""
399
400
Reduction returns a scalar. Must be supported for numerical and
400
401
datetime data types. Returns a float for numerical data types, and
401
402
datetime (with the appropriate timedelta format string) for datetime
402
403
dtypes.
403
404
"""
404
405
405
- def mean (self , * , skip_nulls : bool = True ) -> DType :
406
+ def mean (self , * , skip_nulls : bool = True ) -> Scalar :
406
407
"""
407
408
Reduction returns a scalar. Must be supported for numerical and
408
409
datetime data types. Returns a float for numerical data types, and
409
410
datetime (with the appropriate timedelta format string) for datetime
410
411
dtypes.
411
412
"""
412
413
413
- def std (self , * , skip_nulls : bool = True ) -> DType :
414
+ def std (self , * , skip_nulls : bool = True ) -> Scalar :
414
415
"""
415
416
Reduction returns a scalar. Must be supported for numerical and
416
417
datetime data types. Returns a float for numerical data types, and
417
418
datetime (with the appropriate timedelta format string) for datetime
418
419
dtypes.
419
420
"""
420
421
421
- def var (self , * , skip_nulls : bool = True ) -> DType :
422
+ def var (self , * , skip_nulls : bool = True ) -> Scalar :
422
423
"""
423
424
Reduction returns a scalar. Must be supported for numerical and
424
425
datetime data types. Returns a float for numerical data types, and
0 commit comments