Skip to content

all_time_stats expects dist_XXXX columns in year ascending order #115

Description

@jessjaco

Perhaps just a note in the docs is needed, but all_time_stats expects any columns to be ordered by ascending year in this section:

# Select date columns only
year_cols = x.index.str.contains(col)
subset = x.loc[year_cols].astype(float)
# Restrict to requested initial year
subset.index = subset.index.str.lstrip("dist_").astype(int)
subset = subset.loc[initial_year:]

Particularly this line:

subset = subset.loc[initial_year:] 

(I also see a hardcoded "dist_" string that should be replaced by col)

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