StatsReporting / stargazer

Python implementation of the R stargazer multiple regression model creation tool
Other
197 stars 48 forks source link

Is there a way tou use pandas' dataframes as inputs? #25

Closed lucascr91 closed 4 years ago

lucascr91 commented 4 years ago

In R, one can use dataframes as input in the function stargazer, then the output can be a statistical summary of variables (summary=TRUE) or just the plain dataframe (summary=FALSE).

It looks like this current implementation of stargazer in python only accepts regressions models as input

toobaz commented 4 years ago

Isn't the "statistical summary of variables" just provided by pd.DataFrame.describe()?

lucascr91 commented 4 years ago

Of course, but this doesn't generate an output in TEX format, I guess. The point is that the current module don't accept anything other than a regression object as input, while in R the user do have this option

toobaz commented 4 years ago

Of course, but this doesn't generate an output in TEX format, I guess

df.describe().to_latex()

lucascr91 commented 4 years ago

Sorry, I wasn't aware of this method. Thank you for the answer.

toobaz commented 4 years ago

No problem.