Skip to content

[BUG] plot_series has side-effect on index name #1

Closed
@aiwalter

Description

@aiwalter

Describe the bug
Function plot_series has side-effects as y forgets index name after calling plot_series. Probably it can be fixed by simply adding a y = y.copy() to the function.

To Reproduce

from sktime.datasets import load_airline
from sktime.utils.plotting import plot_series

y = load_airline()
y = y.to_frame()
y_name1 = y.index.name
plot_series(y)
y_name2 = y.index.name

assert y_name1 == y_name2

Expected behavior

Additional context

Versions
'0.15.0'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions