Skip to content

add constant time Series/Dataframe.count(), trivial implementations of iloc(integer) #176

@nevion

Description

@nevion

count requires O(N) and at(offset) - the most frequent type of index - does hashmap lookups.

consider an O(N) for loop becomes O(N^2) and the performance of this sort of loop could have.... The random places in practice one needs the shape of a dataframe are high and shouldn't incur computation or heavy operations.

function visitEveryRow( visitor )
for(let i = 0; i < df.count(); ++i){
   visitor(df.iloc[i])
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions