Skip to content

Gallery examples fail with pandas >=2.1 due to invalid frequency 'ME' #2692

@aman-coder03

Description

@aman-coder03

When building the documentation with pandas 2.1.4, 2 gallery examples in the irradiance-transposition section fail during execution plot_transposition_gain.py and plot_seasonal_tilt.py

Both examples use:
.resample("ME") which raises ValueError: Invalid frequency: ME

Example

import pandas as pd
import numpy as np

idx = pd.date_range("2020-01-01", periods=100, freq="H")
s = pd.Series(np.random.rand(100), index=idx)
s.resample("ME").sum()

on pandas 2.1.4 this results in ValueError: Invalid frequency: ME

It appears that "ME" is no longer recognized as a valid frequency alias in recent pandas versions
Happy to open a PR, if this change is appropriate.

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