Adding statsmodels 'predict' results to a Pandas dataframe

前端 未结 1 929
误落风尘
误落风尘 2020-12-11 11:40

It is common to want to append the results of predictions to the dataset used to make the predictions, but the statsmodels predict function returns (non-indexed

相关标签:
1条回答
  • 2020-12-11 11:59

    Predict shouldn't drop any rows. Can you post a minimal working example where this happens? Preserving the pandas index is on my radar and should be fixed in master soon.

    https://github.com/statsmodels/statsmodels/issues/1501

    Edit: Nevermind. This is a known issue. https://github.com/statsmodels/statsmodels/issues/1352

    0 讨论(0)
提交回复
热议问题