Skip to content

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

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])
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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