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

Reduce accuracy up to one digit after decimal? #1

Open
writingwhilenoodles opened this issue Nov 19, 2021 · 1 comment
Open

Reduce accuracy up to one digit after decimal? #1

writingwhilenoodles opened this issue Nov 19, 2021 · 1 comment

Comments

@writingwhilenoodles
Copy link

Hi!

I know you haven't worked on this for 3 years so this probably comes out of nowhere - but my country just introduced their own regional version of AYTO and I wanted to use your tool to calculate the odds.

I got it working however it currently shows 6 digits after the decimal. I was wondering if it was possible to make an adjustment to the script to limit this to 1 or 2 digits after the decimal? For instance instead of 19.241285% make it show 19.24% or even 19.2%?

Thanks!

Love your work, it's really a fun way to engage with the show a little more!

@BKer
Copy link

BKer commented Dec 10, 2021

You can easily change the number of digits by setting an option. (Checkout the Pandas documentation for information)

For example, by adding the following to the script:
pd.set_option('precision', 2)
The output contains the desired 19.24%

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