c.b...@posteo.jp
unread,Dec 20, 2022, 5:46:16 AM12/20/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pystat...@googlegroups.com
Hello,
from a linear regression using (os().fit()) I get back an object of type
"<class
'statsmodels.regression.linear_model.RegressionResultsWrapper'>".
I want to work further with it create a pandas dataframe of that results
for later use in a report (e.g. to_excel(), to_markdown(), ...).
I see the wrapper do offer me a "Summery" object which itself has a
"tables" list attribute offering me "SimpleTable". I found methods
"as_text()", "as_csv()", "as_html()" or the attribute "data". The latter
can be used to initialize a pandas.DataFrame.
OK, this works but feels like a hacky workaround. My question is if
there is a more elegant way with methods/attributes I haven't found yet?
The background of my question is that my reporting-pipeline is based on
pandas.DataFrame. I do build docx, xlsx, md including figures out of it.
But maybe there is a better solution then transforming the results into
a pandas.DataFrame?
Kind
Christian