Skip to content

Pandas time series plotting not working #999

@frederickayala

Description

@frederickayala

Hello,

I created an Anaconda environment on MacOS using:
conda install jupyter pandas fbprophet seaborn

I have a Pandas DataFrame with a DatetimeIndex. I am plotting the time series using the pandas functionality:

df["ds"] = pd.to_datetime(df["ds"])
df = df.set_index("ds")
df[["y"]].plot()

The code works if I don't import fbprophet and fails after I import it with the error:
TypeError: float() argument must be a string or a number, not 'Period'

Checking the code I noticed that the matplotlib converters are being deregistered.

The code works if I add pd.plotting.register_matplotlib_converters() before plotting.

Is there a reason for using deregister_matplotlib_converters()?

Thanks

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