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
"""
@@ -323,56 +324,56 @@ def all(self, *, skip_nulls: bool = True) -> bool:
323
324
If column is not boolean.
324
325
"""
325
326
326
- def min (self , * , skip_nulls : bool = True ) -> DType :
327
+ def min (self , * , skip_nulls : bool = True ) -> Scalar :
327
328
"""
328
329
Reduction returns a scalar. Any data type that supports comparisons
329
330
must be supported. The returned value has the same dtype as the column.
330
331
"""
331
332
332
- def max (self , * , skip_nulls : bool = True ) -> DType :
333
+ def max (self , * , skip_nulls : bool = True ) -> Scalar :
333
334
"""
334
335
Reduction returns a scalar. Any data type that supports comparisons
335
336
must be supported. The returned value has the same dtype as the column.
336
337
"""
337
338
338
- def sum (self , * , skip_nulls : bool = True ) -> DType :
339
+ def sum (self , * , skip_nulls : bool = True ) -> Scalar :
339
340
"""
340
341
Reduction returns a scalar. Must be supported for numerical and
341
342
datetime data types. The returned value has the same dtype as the
342
343
column.
343
344
"""
344
345
345
- def prod (self , * , skip_nulls : bool = True ) -> DType :
346
+ def prod (self , * , skip_nulls : bool = True ) -> Scalar :
346
347
"""
347
348
Reduction returns a scalar. Must be supported for numerical data types.
348
349
The returned value has the same dtype as the column.
349
350
"""
350
351
351
- def median (self , * , skip_nulls : bool = True ) -> DType :
352
+ def median (self , * , skip_nulls : bool = True ) -> Scalar :
352
353
"""
353
354
Reduction returns a scalar. Must be supported for numerical and
354
355
datetime data types. Returns a float for numerical data types, and
355
356
datetime (with the appropriate timedelta format string) for datetime
356
357
dtypes.
357
358
"""
358
359
359
- def mean (self , * , skip_nulls : bool = True ) -> DType :
360
+ def mean (self , * , skip_nulls : bool = True ) -> Scalar :
360
361
"""
361
362
Reduction returns a scalar. Must be supported for numerical and
362
363
datetime data types. Returns a float for numerical data types, and
363
364
datetime (with the appropriate timedelta format string) for datetime
364
365
dtypes.
365
366
"""
366
367
367
- def std (self , * , skip_nulls : bool = True ) -> DType :
368
+ def std (self , * , skip_nulls : bool = True ) -> Scalar :
368
369
"""
369
370
Reduction returns a scalar. Must be supported for numerical and
370
371
datetime data types. Returns a float for numerical data types, and
371
372
datetime (with the appropriate timedelta format string) for datetime
372
373
dtypes.
373
374
"""
374
375
375
- def var (self , * , skip_nulls : bool = True ) -> DType :
376
+ def var (self , * , skip_nulls : bool = True ) -> Scalar :
376
377
"""
377
378
Reduction returns a scalar. Must be supported for numerical and
378
379
datetime data types. Returns a float for numerical data types, and
0 commit comments