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

How to keep two decimal places with text_format='full' #142

Open
z626093820 opened this issue Jan 2, 2024 · 1 comment
Open

How to keep two decimal places with text_format='full' #142

z626093820 opened this issue Jan 2, 2024 · 1 comment

Comments

@z626093820
Copy link

After I use annotator.configure(test='t-test_ind', text_format='full') to calculate the p-value, how can I round it to two decimal places."

THANK YOU!

@trevismd
Copy link
Owner

trevismd commented Jan 2, 2024

Hi!
You can configure pvalue_format_string as you wish. For example, for 2 decimal places in scientific notation,

annotator.configure(test='t-test_ind', text_format='full', pvalue_format_string='{:.2e}')

Which overrides the default defined in

self._pvalue_format_string = '{:.3e}'

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

2 participants