We Are Going To Discuss About statsmodels.api returning MissingDataError: exog contains inf or nans when trying to fit multivariate regression. So lets Start this Python Article.
statsmodels.api returning MissingDataError: exog contains inf or nans when trying to fit multivariate regression
- How to solve statsmodels.api returning MissingDataError: exog contains inf or nans when trying to fit multivariate regression
I am not so sure how you conclude there's no na values, if you look at your table:
x_multi_cons.isna().sum() [...] n_hos_beds 8 [...]
This means there are 8 missing values forn_hos_beds
. If it doesn't hurt you model, just remove the nans at the start:df = df.dropna()
- statsmodels.api returning MissingDataError: exog contains inf or nans when trying to fit multivariate regression
I am not so sure how you conclude there's no na values, if you look at your table:
x_multi_cons.isna().sum() [...] n_hos_beds 8 [...]
This means there are 8 missing values forn_hos_beds
. If it doesn't hurt you model, just remove the nans at the start:df = df.dropna()
Solution 1
I am not so sure how you conclude there’s no na values, if you look at your table:
x_multi_cons.isna().sum()
[...]
n_hos_beds 8
[...]
This means there are 8 missing values for n_hos_beds
. If it doesn’t hurt you model, just remove the nans at the start:
df = df.dropna()
Original Author StupidWolf Of This Content
Conclusion
So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.