Display dataframe without scientific notation

I’m new to anvil and currently developing an anvil project where given some imput after running the project it displays a DataFrame.
I’ve solved the dataframe display with

return resultf.to_markdown(showindex=False)

The detail is that the output in the dataframe is shown in scientific notation and I don’t want that
I’ve tried adding the following line after the return option

suppress scientific notation by setting float_format

pd.options.display.float_format = ‘{:.0f}’.format

Which is the option that should make the dataframe inputs not to display in scientific notation, but nothing has change when rerunning the project.

Just going to ask the two most common issues, since I’m not sure if I have enough info. Are you using the RichText component to display your markdown?

and also

Have you looked at the raw source data being fed to pandas to make sure it does not contain the exponential notation? (It happens more often than you might think)

Your issue might not be either of these, but It never hurts to ask.

Also Welcome to anvil! :wave:

2 Likes