Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix TimeSeries.pd_series not retaining original name #2102

4 changes: 2 additions & 2 deletions darts/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -1472,10 +1472,10 @@ def pd_series(self, copy=True) -> pd.Series:
self._assert_deterministic()
if copy:
return pd.Series(
self._xa[:, 0, 0].values.copy(), index=self._time_index.copy()
self._xa[:, 0, 0].values.copy(), index=self._time_index.copy(), name=self.components.array[0]
fmerinocasallo marked this conversation as resolved.
Show resolved Hide resolved
)
else:
return pd.Series(self._xa[:, 0, 0].values, index=self._time_index)
return pd.Series(self._xa[:, 0, 0].values, index=self._time_index, name=self.components.array[0])
fmerinocasallo marked this conversation as resolved.
Show resolved Hide resolved

def pd_dataframe(self, copy=True, suppress_warnings=False) -> pd.DataFrame:
"""
Expand Down
Loading