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

Add feature to automatically rename categorical variables in etable #798

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

dsliwka
Copy link
Contributor

@dsliwka dsliwka commented Jan 25, 2025

This adds a feature to etable that automatically renames categorical variables in regression tables. The user can specify a formatting template (default is "{variable}={value}"). It should work either for pandas categoricals (i.e "y ~ x + c" when c is categorical) and with categorical variables generated in the regression formula with the C() or i() operator.

To do this, the existing rename_categoricals function is slightly extended to allow using formatting templates.

Copy link

codecov bot commented Jan 25, 2025

Codecov Report

Attention: Patch coverage is 80.00000% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pyfixest/report/utils.py 75.00% 7 Missing ⚠️
Flag Coverage Δ
core-tests 80.80% <80.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
pyfixest/report/summarize.py 87.40% <100.00%> (-0.20%) ⬇️
pyfixest/report/utils.py 84.44% <75.00%> (-5.88%) ⬇️

@s3alfisc
Copy link
Member

pre-commit.ci autofix

@s3alfisc
Copy link
Member

pre-commit.ci autofix

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

Successfully merging this pull request may close these issues.

2 participants