[ENH] test that forecasters preserve name
attr of pd.Series
#4157
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a test,
test_predict_series_name_preserved
, to the forecasting test suite, to test that thename
attribute ofpd.Series
is preserved infit
/predict
.A test for detecting the general issue at the root of #4144, which currently was not covered by the forecasting test suite, as the scenarios containing
pd.Series
with non-Nonename
attribute did not interact with the tests in which the time index and name were checked for consistency via_assert_correct_pred_time_index
.If this works, this should surface a number of cases with the problem, among them
NaiveForecaster
(where this surfaced through manual testing in the context of #4150 failures)