Skip to content

TimeSeries.max(axis=0), .min(axis=0) return a meaningless index #2696

@eschibli

Description

@eschibli

Describe the missing or desired feature
TimeSeries.max(axis=0) and TimeSeries.max(axis=0) return a single-step timeseries, with the TimeIndex corresponding to the first timestep of the original series. This is documented correctly but is not intuitive. This seems to be done for consistency with Timeseries.mean(axis=0), median(axis=0), etc. There also does not seem to be a TimeSeries equivalent of Series.idxmax or np.ndarray.argmax.

Describe proposed solution
Chage max() and min() to return a single-step timeseries with the index of the returned value. This would be a breaking change obviously, though I cannot immediately imagine code depending on the previous behavior. Alternatively, add a keyword argument to enable this behavior, defaulting to current behavior.

Describe potential alternatives
Or alternatively, add Timeseries.idxmax/min/etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    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