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

BUG/Design: input/output variable naming: use {var}_frame, not {var}_df for dataframe #7340

Open
josef-pkt opened this issue Feb 20, 2021 · 1 comment

Comments

@josef-pkt
Copy link
Member

josef-pkt commented Feb 20, 2021

based on a complaint in a japanese twitter thread

https://www.statsmodels.org/stable/generated/statsmodels.stats.diagnostic.acorr_ljungbox.html

uses model_df for degrees of freedom, and return_df for dataframe

abbreviation df should be reserved for degrees of freedom in code,
(I also mostly avoid df for dataframe in notebooks)

for summary type results I converged on using frame, e.g. summary_frame
more general patsy (and maybe we, at least in datasets) use return_pandas

@tatamiya
Copy link
Contributor

Thank you for finding my tweets!

As to the return_df case, I think return_dataframe or return_frame is better.

@bashtage bashtage changed the title BUG/Design: naming: don't use df for dataframe BUG/Design: input/output variable naming: use {var}_frame, not {var}_df for dataframe Feb 22, 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