diff --git a/antarest/study/storage/rawstudy/model/filesystem/matrix/date_serializer.py b/antarest/study/storage/rawstudy/model/filesystem/matrix/date_serializer.py index 4f2c6213cc..2b8c431085 100644 --- a/antarest/study/storage/rawstudy/model/filesystem/matrix/date_serializer.py +++ b/antarest/study/storage/rawstudy/model/filesystem/matrix/date_serializer.py @@ -110,7 +110,7 @@ def extract_date(self, df: pd.DataFrame) -> Tuple[pd.Index[str], pd.DataFrame]: to_remove = cast(Sequence[Hashable], df.columns[0:5]) body = df.drop(to_remove, axis=1) - return cast(pd.Index[str], pd.Index(date)), body + return pd.Index(date), body # type: ignore class DailyMatrixSerializer(IDateMatrixSerializer): @@ -148,7 +148,7 @@ def extract_date(self, df: pd.DataFrame) -> Tuple[pd.Index[str], pd.DataFrame]: to_remove = cast(Sequence[Hashable], df.columns[0:4]) body = df.drop(to_remove, axis=1) - return cast(pd.Index[str], pd.Index(date)), body + return pd.Index(date), body # type: ignore class WeeklyMatrixSerializer(IDateMatrixSerializer):