Format it to 6 decimal places:

format(value, '.6f')

Demo:

>>> format(2.0, '.6f')
'2.000000'

The format() function turns values to strings following the formatting instructions given.

Answer from Martijn Pieters on Stack Overflow
🌐
Bobby Hadz
bobbyhadz.com › blog › python-add-zeros-after-decimal
Add zeros to a Float after the Decimal in Python | bobbyhadz
Use the `format()` function to add zeros to a float after the decimal, e.g. `result = format(my_float, '.3f')`.
Discussions

keep trailing 0's in floats?
The Decimal library is great for this. This helps you avoid floating point arithmetic errors too. More on reddit.com
🌐 r/learnpython
6
2
July 20, 2017
python - Adding zeros after the decimal point - Stack Overflow
I have a certain dictionary key and its values that I wish to print out in a string in a certain fashion. The key and its values is: 'HUF': (315.89, 307.09) and the desired output is: HUF....315... More on stackoverflow.com
🌐 stackoverflow.com
python - How to add zeros after the decimal to make 2 digits after decimal in ipython and pyspark - Stack Overflow
Now some of the numbers in this ... any decimal like 5 or 23. What I want is to have all the numbers two digits after decimal. If they do not have two digits then an ending 0 should be added like for above 9.1 should become 9.10 and 5 should become 5.00.... More on stackoverflow.com
🌐 stackoverflow.com
format - python padding decimals with zeros - Stack Overflow
56 Add zeros to a float after the decimal point in Python More on stackoverflow.com
🌐 stackoverflow.com
🌐
IQCode
iqcode.com › code › python › how-to-add-extra-zeros-after-decimal-in-python
how to add extra zeros after decimal in python Code Example
October 6, 2021 - adding zero before a number in python how to add leading zeros in pythyon python print leading zeros python add zero before single digits how to prevent python from giving extra zero decimal values python add zero after decimal add zero before number in string python add point zero in value python how to add zeros to decimal oin python leading zeros in integers python int leading zero python how to add 0 after decimal in python python add zeros after decimal python add leading 0 to number how to add extra zero in float python python add leading zeros to string string format python leading zero
🌐
YouTube
youtube.com › speak with ujjwal
How to add zero at the end of a decimal number in Python ? - YouTube
How to add trailing zero at the end of a decimal number in Python format function in Python
Published: July 21, 2020
Views: 1K
Find elsewhere
🌐
TopDealsNet
stlplaces.com › blog › how-to-add-zeros-after-a-decimal-in-python
How to Add Zeros After A Decimal In Python in 2026?
September 20, 2025 - If you want to add zeros beyond the current decimal places, you can simply increase the number within the curly braces. For example, "{:.4f}".format(number) would add two additional zeros after the decimal.
🌐
Stack Overflow
stackoverflow.com › questions › 32079394 › how-to-add-zeros-after-the-decimal-to-make-2-digits-after-decimal-in-ipython-and
python - How to add zeros after the decimal to make 2 digits after decimal in ipython and pyspark - Stack Overflow
Now some of the numbers in this list come out to have two digits after decimal like 10.17 but there are numbers which have less than two digits after decimal like 9.1 or some do not have any decimal like 5 or 23. What I want is to have all the numbers two digits after decimal. If they do not have two digits then an ending 0 should be added like for above 9.1 should become 9.10 and 5 should become 5.00.
🌐
CodingTechRoom
codingtechroom.com › question › -add-zeros-after-decimal-python
How to Add N Number of Zeros After a Decimal in Python - CodingTechRoom
In Python, you can format float values to add a specific number of zeros after the decimal point by using formatted string literals or the format method.
🌐
Machinelearninghelp
machinelearninghelp.org › programming-for-machine-learning › how-to-add-extra-zeros-after-decimal-in-python
Adding Extra Zeros after Decimal in Python for Machine Learning Applications
This technique is particularly ... In Python, adding extra zeros after a decimal number involves rounding it to a specified precision using the round() function or manipulating its string representation....
🌐
Kaggle
kaggle.com › questions-and-answers › 388405
[Python] Adding trailing zeros to every value in a column with floats? | Kaggle
Hi fellow Kagglers! I have an issue I can't quite fix myself. I have a column in a dataframe with inconsistent decimals which needs fixing. All values need 2...
🌐
Iditect
iditect.com › faq › python › add-zeros-to-a-float-after-the-decimal-point-in-python.html
Add zeros to a float after the decimal point in Python
If you want to add zeros to a floating-point number in Python after the decimal point to achieve a certain number of decimal places, you can use string formatting or the round function.
🌐
GeeksforGeeks
geeksforgeeks.org › python-add-trailing-zeros-to-string
Add trailing Zeros to string-Python | GeeksforGeeks
April 5, 2025 - So, appending to a string is nothing ... zeros in Python is basically adding leading zeros until it reaches the desired size.Using zfill() MethodThe simplest way to pad a string with zeros is by using Python’s built-in zfill() ...
🌐
Tutorial Reference
tutorialreference.com › python › examples › faq › python-how-to-add-trailing-zeros-after-decimal-in-float
How to Format Floats with Trailing Zeros in Python | Tutorial Reference
It's crucial to understand that Python's float type does not inherently store trailing zeros after the decimal point. The trailing zeros are added only during formatting for display:
🌐
Machinelearninghelp
machinelearninghelp.org › programming-for-machine-learning › how-to-add-a-zero-after-a-float-in-python
Precision in Numerical Computation
When dealing with numerical computations, ensuring that your results are accurate to the correct number of decimal places can be crucial. However, did you know that there’s more to rounding and truncation than just round() and slicing? This article will delve into the intricacies of adding zeros after a float in Python, providing a step-by-step guide on how to achieve this precision while exploring its significance in machine learning.
🌐
Quora
quora.com › What-is-the-rule-for-adding-zeros-to-the-end-of-a-decimal-when-solving-for-an-answer
What is the rule for adding zeros to the end of a decimal when solving for an answer? - Quora
Answer: You should look for the accuracy and add as much zeroes (or round some decimals away), that the error is a figure of the last decimal given. So, 12,0 ft is exact to a tenth of a ft, 12,00 is exact to a hundredth of a foot, 12,00 +/- 0,02 ft is exact to 2 hundredths of a foot, 12,000 +/- ...
Top answer
1 of 6
96

As you are talking about trailing zeros, this is a question about representation as string, you can use

>>> "%.2f" % round(2606.89579999999, 2)
'2606.90'

Or use modern style with format function:

>>> '{:.2f}'.format(round(2606.89579999999, 2))
'2606.90'

and remove point with replace or translate (_ refers to result of previous command in python console):

>>> _.translate(None, '.')
'260690'

Note that rounding is not needed here, as .2f format applies the same rounding:

>>> "%.2f" % 2606.89579999999
'2606.90'

But as you mentioned excel, you probably would opt to roll your own rounding function, or use decimal, as float.round can lead to strange results due to float representation:

>>> round(2.675, 2)
2.67
>>> round(2606.89579999999, 2)
2606.89

With decimal use quantize:

>>> from decimal import *
>>> x = Decimal('2606.8950000000001')
# Decimal('2606.8950000000001')
>>> '{}'.format(x.quantize(Decimal('.01'), rounding=ROUND_HALF_EVEN))
'2606.90'

That, for your original task, becomes:

>>> x = Decimal('2606.8950000000001')
>>> int((x*100).quantize(1, rounding=ROUND_HALF_EVEN))
260690

And the reason of strange rounding comes to the front with Decimal:

>>> x = Decimal(2606.8950000000001)
# Decimal('2606.89499999999998181010596454143524169921875') # internal float repr
2 of 6
30

As of Python 3.6, you can also use an f-string to inline format the number. In this case, the desired format is floating point with 2 decimal places so you would use .2f as the format specifier:

x = 2606.89579999999
x = round(x, 2)      # not strictly necessary as format will round for you
print(f'{x:.2f}')

Output:

2606.90