Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New API for stargazer #44

Open
toobaz opened this issue Jun 4, 2020 · 3 comments
Open

New API for stargazer #44

toobaz opened this issue Jun 4, 2020 · 3 comments

Comments

@toobaz
Copy link
Collaborator

toobaz commented Jun 4, 2020

I think it would be much more pythonic to do

table = Stargazer([model1, model2], show_adj_r2=False, show_notes=False)

or even

table = Stargazer([model1, model2]).config(show_adj_r2=False, show_notes=False)

(both approaches also allowing to pre-create a dict of arguments) than the current

table = Stargazer([model1, model2])
table.show_adj_r2 = False
table.show_notes = False

... and that this is going to be more and more important as stargazer supports more features/models.

The three approaches do not necessarily exclude each other, but I would like to present the first as standard. It also solves some inconsistencies such as show_model_numbers being a method while show_notes is an attribute.

@MaxGhenis
Copy link
Contributor

+1, I've so far created functions to specify tables in similar ways. The first also seems most natural to me.

@Keating950
Copy link

I know this is an ancient issue, but I wanted to throw in another suggestion, which is to make methods like Stargazer.covariate_order return self to enable chaining them together.

@toobaz
Copy link
Collaborator Author

toobaz commented Jun 1, 2023

I know this is an ancient issue, but I wanted to throw in another suggestion, which is to make methods like Stargazer.covariate_order return self to enable chaining them together.

Thanks for your suggestion. I'm not 100% sure "methods like Stargazer.covariate_order" will even exist in the future, the alternative being something like config in my first post, but definitely it will be something that can be chained (again, as in the example).

And by the way, this is an old and inactive but definitely not obsolete issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants