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

Allow formatting/content options to be set in the model summary constructor #1119

Open
1 task done
cdiener opened this issue Oct 5, 2021 · 2 comments
Open
1 task done
Assignees

Comments

@cdiener
Copy link
Member

cdiener commented Oct 5, 2021

Checklist

Is your feature related to a problem? Please describe it.

Summaries look great in Jupyter notebooks by default, but changing output options is clunky as it happens only in the to_string and to_html methods. For instance, there is no easy way to change the summary element to something other than "C" in a notebook because model.summary().to_html(element="N", names=True) will not render nicely by default.

Describe the solution you would like.

I would like the constructor to accept optional keyword arguments for those methods, enabling things like: model.summary(element="N", names=True).

Describe alternatives you considered

Wrapping everything in HTML(...) calls but this makes object inspection clunky.

Additional context

I'd be happy to provide a PR if other agree with this design.

@Midnighter
Copy link
Member

The original intent was that you can create different outputs from the same summary object. I would like to keep that behavior but the constructor arguments could certainly set the default if that's good enough for you?

@cdiener
Copy link
Member Author

cdiener commented Oct 6, 2021

Oh sorry. Never meant to remove them from the to_* methods. Just want them settable in the constructor as well. So they would set the default as you said.

@cdiener cdiener self-assigned this Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants