From fa4fb6680011f25bd70dc32efb6efec48754b05d Mon Sep 17 00:00:00 2001 From: MarcoGorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Tue, 21 Nov 2023 11:24:50 +0000 Subject: [PATCH] add Column.len --- spec/API_specification/dataframe_api/column_object.py | 8 ++++---- spec/API_specification/dataframe_api/typing.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/API_specification/dataframe_api/column_object.py b/spec/API_specification/dataframe_api/column_object.py index 9ae7de4a..c6c7b4fd 100644 --- a/spec/API_specification/dataframe_api/column_object.py +++ b/spec/API_specification/dataframe_api/column_object.py @@ -90,10 +90,6 @@ def name(self) -> str: """Return name of column.""" ... - def __len__(self) -> int: - """Return the number of rows.""" - ... - def __iter__(self) -> NoReturn: """Iterate over elements. @@ -750,6 +746,10 @@ def var( """ ... + def len(self) -> Scalar: + """Return the number of rows.""" + ... + def cumulative_max(self) -> Self: """Reduction returns a Column. diff --git a/spec/API_specification/dataframe_api/typing.py b/spec/API_specification/dataframe_api/typing.py index 818101ec..39071ca8 100644 --- a/spec/API_specification/dataframe_api/typing.py +++ b/spec/API_specification/dataframe_api/typing.py @@ -69,7 +69,7 @@ class NullType: null: NullType class Datetime: - time_unit: Literal['ms', 'us'] + time_unit: Literal["ms", "us"] time_zone: str | None def __init__( # noqa: ANN204 @@ -80,7 +80,7 @@ def __init__( # noqa: ANN204 ... class Duration: - time_unit: Literal['ms', 'us'] + time_unit: Literal["ms", "us"] def __init__( # noqa: ANN204 self,