Skip to content

Implement __len__ on SedonaDB DataFrame for Pythonic len(df) support #553

@prantogg

Description

@prantogg

It would be great if SedonaDB DataFrames supported Python’s built-in len() by implementing __len__.

In Python data tooling, it’s common (and expected) that len(df) returns the number of rows in a dataframe-like object. For example, DuckDB relations/dataframes support this kind of “Pythonic” ergonomics.

Today, calling len(df) on a SedonaDB DataFrame raises a TypeError because the DataFrame type doesn’t implement __len__.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions